diff options
author | hugbubby <hugbubby@protonmail.com> | 2018-07-15 18:12:16 -0700 |
---|---|---|
committer | hugbubby <hugbubby@protonmail.com> | 2018-07-18 13:55:30 -0700 |
commit | a592f0fa87c96f1c2dea1406e4dcbfa5cde4f8f1 (patch) | |
tree | c81dafd7a0cc359e66e0ba2b1aa09f9b123c0b0d /auto_tests/dht_test.c | |
parent | 864d1c15e4a3b8df236af320312e8115c6bcd791 (diff) |
Wrong use of unsigned integer.
Diffstat (limited to 'auto_tests/dht_test.c')
-rw-r--r-- | auto_tests/dht_test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/auto_tests/dht_test.c b/auto_tests/dht_test.c index dec803e5..1d519951 100644 --- a/auto_tests/dht_test.c +++ b/auto_tests/dht_test.c | |||
@@ -96,7 +96,7 @@ static int client_in_list(Client_data *list, uint32_t length, const uint8_t *pub | |||
96 | { | 96 | { |
97 | uint32_t i; | 97 | uint32_t i; |
98 | 98 | ||
99 | for (i = 0; i < (uint32_t)length; ++i) { | 99 | for (i = 0; i < length; ++i) { |
100 | if (id_equal(public_key, list[i].public_key)) { | 100 | if (id_equal(public_key, list[i].public_key)) { |
101 | return i; | 101 | return i; |
102 | } | 102 | } |
@@ -710,7 +710,7 @@ END_TEST | |||
710 | 710 | ||
711 | static void dht_pack_unpack(const Node_format *nodes, size_t size, uint8_t *data, size_t length) | 711 | static void dht_pack_unpack(const Node_format *nodes, size_t size, uint8_t *data, size_t length) |
712 | { | 712 | { |
713 | uint16_t packed_size = pack_nodes(data, length, nodes, size); | 713 | int16_t packed_size = pack_nodes(data, length, nodes, size); |
714 | ck_assert_msg(packed_size != -1, "Wrong pack_nodes result"); | 714 | ck_assert_msg(packed_size != -1, "Wrong pack_nodes result"); |
715 | 715 | ||
716 | uint16_t processed = 0; | 716 | uint16_t processed = 0; |