From 2246517c3ec2e6c80ddbdc6591f1ab9c927ab4d4 Mon Sep 17 00:00:00 2001 From: sudden6 Date: Sun, 22 May 2022 00:07:42 +0200 Subject: [PATCH] Fix: use UINT32_MAX instead of -1 --- toxcore/DHT.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toxcore/DHT.c b/toxcore/DHT.c index 6d465388..56198ff1 100644 --- a/toxcore/DHT.c +++ b/toxcore/DHT.c @@ -1899,7 +1899,7 @@ int dht_getfriendip(const DHT *dht, const uint8_t *public_key, IP_Port *ip_port) const DHT_Friend *const frnd = &dht->friends_list[friend_index]; const uint32_t client_index = index_of_client_pk(frnd->client_list, MAX_FRIEND_CLIENTS, public_key); - if (client_index == -1) { + if (client_index == UINT32_MAX) { return 0; }