diff options
author | iphydf <iphydf@users.noreply.github.com> | 2018-02-16 17:16:49 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-02-18 13:01:16 +0000 |
commit | 3f73dfa7f1a7fa1afef2492d1834e4c619f4afb3 (patch) | |
tree | a8fa188dc9929dbfbb5556b1e58d17d46596ec05 /toxcore/DHT.h | |
parent | 841b63434fcb949c48d42a2a8b2b4f69467f3f78 (diff) |
Use `const` more in C code.
Diffstat (limited to 'toxcore/DHT.h')
-rw-r--r-- | toxcore/DHT.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/toxcore/DHT.h b/toxcore/DHT.h index 808470fc..284aa8c0 100644 --- a/toxcore/DHT.h +++ b/toxcore/DHT.h | |||
@@ -413,7 +413,7 @@ void cryptopacket_registerhandler(DHT *dht, uint8_t byte, cryptopacket_handler_c | |||
413 | uint32_t DHT_size(const DHT *dht); | 413 | uint32_t DHT_size(const DHT *dht); |
414 | 414 | ||
415 | /* Save the DHT in data where data is an array of size DHT_size(). */ | 415 | /* Save the DHT in data where data is an array of size DHT_size(). */ |
416 | void DHT_save(DHT *dht, uint8_t *data); | 416 | void DHT_save(const DHT *dht, uint8_t *data); |
417 | 417 | ||
418 | /* Load the DHT from data of size size. | 418 | /* Load the DHT from data of size size. |
419 | * | 419 | * |
@@ -427,15 +427,15 @@ DHT *new_DHT(Logger *log, Networking_Core *net, bool holepunching_enabled); | |||
427 | 427 | ||
428 | void kill_DHT(DHT *dht); | 428 | void kill_DHT(DHT *dht); |
429 | 429 | ||
430 | /* return 0 if we are not connected to the DHT. | 430 | /* return false if we are not connected to the DHT. |
431 | * return 1 if we are. | 431 | * return true if we are. |
432 | */ | 432 | */ |
433 | int DHT_isconnected(const DHT *dht); | 433 | bool DHT_isconnected(const DHT *dht); |
434 | 434 | ||
435 | /* return 0 if we are not connected or only connected to lan peers with the DHT. | 435 | /* return false if we are not connected or only connected to lan peers with the DHT. |
436 | * return 1 if we are. | 436 | * return true if we are. |
437 | */ | 437 | */ |
438 | int DHT_non_lan_connected(const DHT *dht); | 438 | bool DHT_non_lan_connected(const DHT *dht); |
439 | 439 | ||
440 | 440 | ||
441 | uint32_t addto_lists(DHT *dht, IP_Port ip_port, const uint8_t *public_key); | 441 | uint32_t addto_lists(DHT *dht, IP_Port ip_port, const uint8_t *public_key); |