diff options
author | iphydf <iphydf@users.noreply.github.com> | 2018-08-27 12:52:34 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-08-27 12:54:46 +0000 |
commit | 0075374f2bb3bb72ef1112471f1aacf12b6b6658 (patch) | |
tree | add97dd9763a59685c3c36003c5962905cf6d751 /toxcore/onion_announce.c | |
parent | 25a477a7e429f108cb690d0c24701272ec30195f (diff) |
Make `ip_is_lan` return bool instead of 0/-1.
This inverts the truthiness of the return value. Previously, 0 meant
`true` and -1 meant `false`. Now, `true` (1) means `true` and `false` (0)
means `false`.
Diffstat (limited to 'toxcore/onion_announce.c')
-rw-r--r-- | toxcore/onion_announce.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/onion_announce.c b/toxcore/onion_announce.c index b7fdb5f7..f38772dd 100644 --- a/toxcore/onion_announce.c +++ b/toxcore/onion_announce.c | |||
@@ -412,8 +412,8 @@ static int handle_announce_request(void *object, IP_Port source, const uint8_t * | |||
412 | 412 | ||
413 | /*Respond with a announce response packet*/ | 413 | /*Respond with a announce response packet*/ |
414 | Node_format nodes_list[MAX_SENT_NODES]; | 414 | Node_format nodes_list[MAX_SENT_NODES]; |
415 | unsigned int num_nodes = get_close_nodes(onion_a->dht, plain + ONION_PING_ID_SIZE, nodes_list, net_family_unspec, | 415 | unsigned int num_nodes = |
416 | ip_is_lan(source.ip) == 0, 1); | 416 | get_close_nodes(onion_a->dht, plain + ONION_PING_ID_SIZE, nodes_list, net_family_unspec, ip_is_lan(source.ip), 1); |
417 | uint8_t nonce[CRYPTO_NONCE_SIZE]; | 417 | uint8_t nonce[CRYPTO_NONCE_SIZE]; |
418 | random_nonce(nonce); | 418 | random_nonce(nonce); |
419 | 419 | ||