mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Conditionally enable non-portable assert on LP64.
This only works on LP64. It may fail on Windows, which can be LLP64 (IL32P64).
This commit is contained in:
parent
ba476e82bb
commit
f208fb53b1
|
@ -2752,7 +2752,9 @@ static uint32_t friends_list_save(const Messenger *m, uint8_t *data)
|
|||
uint8_t *next_data = friend_save(&temp, cur_data);
|
||||
#ifdef TOX_DEBUG
|
||||
assert(next_data - cur_data == friend_size());
|
||||
#ifdef __LP64__
|
||||
assert(memcmp(cur_data, &temp, friend_size()) == 0);
|
||||
#endif
|
||||
#endif
|
||||
cur_data = next_data;
|
||||
num++;
|
||||
|
@ -2812,7 +2814,9 @@ static int friends_list_load(Messenger *m, const uint8_t *data, uint32_t length)
|
|||
const uint8_t *next_data = friend_load(&temp, cur_data);
|
||||
#ifdef TOX_DEBUG
|
||||
assert(next_data - cur_data == friend_size());
|
||||
#ifdef __LP64__
|
||||
assert(memcmp(&temp, cur_data, friend_size()) == 0);
|
||||
#endif
|
||||
#endif
|
||||
cur_data = next_data;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user