summaryrefslogtreecommitdiff
path: root/auto_tests/toxav_many_test.c
diff options
context:
space:
mode:
authorzugz (tox) <mbays+tox@sdf.org>2020-02-28 00:00:00 +0000
committerzugz (tox) <mbays+tox@sdf.org>2020-03-14 00:00:02 +0000
commitc644ef76810f8db61bce3f52d36a1a6a25e47683 (patch)
tree1a4c5ed13f1a3450e3a005746ba6bb0d1af7beaf /auto_tests/toxav_many_test.c
parente6714909898d7e5fe6b35b6d109e584e6c5858b0 (diff)
use -1 rather than ~0 in unsigned integer types
Using ~0 involves a bitwise operation on int, so depends on the internal representation of signed integers.
Diffstat (limited to 'auto_tests/toxav_many_test.c')
-rw-r--r--auto_tests/toxav_many_test.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/auto_tests/toxav_many_test.c b/auto_tests/toxav_many_test.c
index c8b14022..76417366 100644
--- a/auto_tests/toxav_many_test.c
+++ b/auto_tests/toxav_many_test.c
@@ -72,7 +72,7 @@ static void t_accept_friend_request_cb(Tox *m, const uint8_t *public_key, const
72 void *userdata) 72 void *userdata)
73{ 73{
74 if (length == 7 && memcmp("gentoo", data, 7) == 0) { 74 if (length == 7 && memcmp("gentoo", data, 7) == 0) {
75 ck_assert(tox_friend_add_norequest(m, public_key, nullptr) != (uint32_t) ~0); 75 ck_assert(tox_friend_add_norequest(m, public_key, nullptr) != (uint32_t) -1);
76 } 76 }
77} 77}
78 78
@@ -180,9 +180,9 @@ static void test_av_three_calls(void)
180 tox_bootstrap(Bobs[1], "localhost", dht_port, dht_key, nullptr); 180 tox_bootstrap(Bobs[1], "localhost", dht_port, dht_key, nullptr);
181 tox_bootstrap(Bobs[2], "localhost", dht_port, dht_key, nullptr); 181 tox_bootstrap(Bobs[2], "localhost", dht_port, dht_key, nullptr);
182 182
183 ck_assert(tox_friend_add(Bobs[0], address, (const uint8_t *)"gentoo", 7, nullptr) != (uint32_t) ~0); 183 ck_assert(tox_friend_add(Bobs[0], address, (const uint8_t *)"gentoo", 7, nullptr) != (uint32_t) -1);
184 ck_assert(tox_friend_add(Bobs[1], address, (const uint8_t *)"gentoo", 7, nullptr) != (uint32_t) ~0); 184 ck_assert(tox_friend_add(Bobs[1], address, (const uint8_t *)"gentoo", 7, nullptr) != (uint32_t) -1);
185 ck_assert(tox_friend_add(Bobs[2], address, (const uint8_t *)"gentoo", 7, nullptr) != (uint32_t) ~0); 185 ck_assert(tox_friend_add(Bobs[2], address, (const uint8_t *)"gentoo", 7, nullptr) != (uint32_t) -1);
186 186
187 uint8_t off = 1; 187 uint8_t off = 1;
188 188