uint32_t -> unsigned int.

pull/1483/head
irungentoo 2015-12-08 19:09:38 -05:00
parent feda36e7cf
commit 30acc33ef6
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98
1 changed files with 5 additions and 4 deletions

View File

@ -227,7 +227,7 @@ static int handle_ping_response(void *_dht, IP_Port source, const uint8_t *packe
*/
static int in_list(const Client_data *list, uint16_t length, const uint8_t *public_key, IP_Port ip_port)
{
uint32_t i;
unsigned int i;
for (i = 0; i < length; ++i) {
if (id_equal(list[i].public_key, public_key)) {
@ -265,7 +265,6 @@ int add_to_ping(PING *ping, const uint8_t *public_key, IP_Port ip_port)
if (in_list(ping->dht->close_clientlist, LCLIENT_LIST, public_key, ip_port))
return -1;
uint32_t i;
IP_Port temp;
@ -274,6 +273,8 @@ int add_to_ping(PING *ping, const uint8_t *public_key, IP_Port ip_port)
return -1;
}
unsigned int i;
for (i = 0; i < MAX_TO_PING; ++i) {
if (!ip_isset(&ping->to_ping[i].ip_port.ip)) {
memcpy(ping->to_ping[i].public_key, public_key, crypto_box_PUBLICKEYBYTES);
@ -286,7 +287,7 @@ int add_to_ping(PING *ping, const uint8_t *public_key, IP_Port ip_port)
}
}
uint32_t r = rand();
unsigned int r = rand();
for (i = 0; i < MAX_TO_PING; ++i) {
if (id_closest(ping->dht->self_public_key, ping->to_ping[(i + r) % MAX_TO_PING].public_key, public_key) == 2) {
@ -311,7 +312,7 @@ void do_to_ping(PING *ping)
if (!ip_isset(&ping->to_ping[0].ip_port.ip))
return;
uint32_t i;
unsigned int i;
for (i = 0; i < MAX_TO_PING; ++i) {
if (!ip_isset(&ping->to_ping[i].ip_port.ip))