diff options
Diffstat (limited to 'toxcore/onion_client.c')
-rw-r--r-- | toxcore/onion_client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/toxcore/onion_client.c b/toxcore/onion_client.c index 90eea451..4f049fbc 100644 --- a/toxcore/onion_client.c +++ b/toxcore/onion_client.c | |||
@@ -219,7 +219,7 @@ static _Bool path_timed_out(Onion_Client_Paths *onion_paths, uint32_t pathnum) | |||
219 | */ | 219 | */ |
220 | static int random_path(const Onion_Client *onion_c, Onion_Client_Paths *onion_paths, uint32_t pathnum, Onion_Path *path) | 220 | static int random_path(const Onion_Client *onion_c, Onion_Client_Paths *onion_paths, uint32_t pathnum, Onion_Path *path) |
221 | { | 221 | { |
222 | if (pathnum == ~0) { | 222 | if (pathnum == UINT32_MAX) { |
223 | pathnum = rand() % NUMBER_ONION_PATHS; | 223 | pathnum = rand() % NUMBER_ONION_PATHS; |
224 | } else { | 224 | } else { |
225 | pathnum = pathnum % NUMBER_ONION_PATHS; | 225 | pathnum = pathnum % NUMBER_ONION_PATHS; |