summaryrefslogtreecommitdiff
path: root/auto_tests/toxav_basic_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_basic_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_basic_test.c')
-rw-r--r--auto_tests/toxav_basic_test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/auto_tests/toxav_basic_test.c b/auto_tests/toxav_basic_test.c
index 5c6daefa..89c2918a 100644
--- a/auto_tests/toxav_basic_test.c
+++ b/auto_tests/toxav_basic_test.c
@@ -88,7 +88,7 @@ static void t_accept_friend_request_cb(Tox *m, const uint8_t *public_key, const
88 void *userdata) 88 void *userdata)
89{ 89{
90 if (length == 7 && memcmp("gentoo", data, 7) == 0) { 90 if (length == 7 && memcmp("gentoo", data, 7) == 0) {
91 ck_assert(tox_friend_add_norequest(m, public_key, nullptr) != (uint32_t) ~0); 91 ck_assert(tox_friend_add_norequest(m, public_key, nullptr) != (uint32_t) -1);
92 } 92 }
93} 93}
94 94
@@ -191,7 +191,7 @@ static void test_av_flows(void)
191 tox_bootstrap(Alice, "localhost", dht_port, dht_key, nullptr); 191 tox_bootstrap(Alice, "localhost", dht_port, dht_key, nullptr);
192 tox_bootstrap(Bob, "localhost", dht_port, dht_key, nullptr); 192 tox_bootstrap(Bob, "localhost", dht_port, dht_key, nullptr);
193 193
194 ck_assert(tox_friend_add(Bob, address, (const uint8_t *)"gentoo", 7, nullptr) != (uint32_t) ~0); 194 ck_assert(tox_friend_add(Bob, address, (const uint8_t *)"gentoo", 7, nullptr) != (uint32_t) -1);
195 195
196 uint8_t off = 1; 196 uint8_t off = 1;
197 197