Skip to content

Commit 2246517

Browse files
committed
Fix: use UINT32_MAX instead of -1
1 parent e0b00d3 commit 2246517

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

toxcore/DHT.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1899,7 +1899,7 @@ int dht_getfriendip(const DHT *dht, const uint8_t *public_key, IP_Port *ip_port)
18991899
const DHT_Friend *const frnd = &dht->friends_list[friend_index];
19001900
const uint32_t client_index = index_of_client_pk(frnd->client_list, MAX_FRIEND_CLIENTS, public_key);
19011901

1902-
if (client_index == -1) {
1902+
if (client_index == UINT32_MAX) {
19031903
return 0;
19041904
}
19051905

0 commit comments

Comments
 (0)