Fix: use UINT32_MAX instead of -1

This commit is contained in:
sudden6 2022-05-22 00:07:42 +02:00
parent e0b00d3e73
commit 2246517c3e
No known key found for this signature in database
GPG Key ID: 279509B499E032B9

View File

@ -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 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); 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; return 0;
} }