summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2014-02-02 19:44:39 -0500
committerirungentoo <irungentoo@gmail.com>2014-02-02 19:44:39 -0500
commitdbe256cc8291c1c3867dff959cf0660fac58973c (patch)
treea24e2a61a597c5e5cd330a97e4d6973c814ccc78
parentad5d58b4a2908946458c34dbd0034a8a60ff5f7e (diff)
Fixed warning.
-rw-r--r--toxcore/onion_client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/onion_client.c b/toxcore/onion_client.c
index 93697c28..e55e92f3 100644
--- a/toxcore/onion_client.c
+++ b/toxcore/onion_client.c
@@ -767,7 +767,7 @@ static void do_friend(Onion_Client *onion_c, uint16_t friendnum)
767 } 767 }
768 768
769 if (count != MAX_ONION_CLIENTS) { 769 if (count != MAX_ONION_CLIENTS) {
770 if (count < rand() % MAX_ONION_CLIENTS) { 770 if (count < (uint32_t)rand() % MAX_ONION_CLIENTS) {
771 Node_format nodes_list[MAX_SENT_NODES]; 771 Node_format nodes_list[MAX_SENT_NODES];
772 uint32_t num_nodes = get_close_nodes(onion_c->dht, onion_c->friends_list[friendnum].real_client_id, nodes_list, 772 uint32_t num_nodes = get_close_nodes(onion_c->dht, onion_c->friends_list[friendnum].real_client_id, nodes_list,
773 rand() % 2 ? AF_INET : AF_INET6, 1, 0); 773 rand() % 2 ? AF_INET : AF_INET6, 1, 0);
@@ -823,7 +823,7 @@ static void do_announce(Onion_Client *onion_c)
823 } 823 }
824 824
825 if (count != MAX_ONION_CLIENTS) { 825 if (count != MAX_ONION_CLIENTS) {
826 if (count < rand() % MAX_ONION_CLIENTS) { 826 if (count < (uint32_t)rand() % MAX_ONION_CLIENTS) {
827 Node_format nodes_list[MAX_SENT_NODES]; 827 Node_format nodes_list[MAX_SENT_NODES];
828 uint32_t num_nodes = get_close_nodes(onion_c->dht, onion_c->dht->c->self_public_key, nodes_list, 828 uint32_t num_nodes = get_close_nodes(onion_c->dht, onion_c->dht->c->self_public_key, nodes_list,
829 rand() % 2 ? AF_INET : AF_INET6, 1, 0); 829 rand() % 2 ? AF_INET : AF_INET6, 1, 0);