diff options
author | iphydf <iphydf@users.noreply.github.com> | 2018-08-26 18:41:34 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-08-26 20:58:37 +0000 |
commit | 9a70a2c1856a2b1a63aa1e938ddee56bb98308ca (patch) | |
tree | 6b66864a12e24a256194d1a64525e576e86d1b32 /toxcore/DHT.h | |
parent | 5352f483016949073556a1f9ac488051fe96c308 (diff) |
Use `bool` in place of 0/1 int values.
Diffstat (limited to 'toxcore/DHT.h')
-rw-r--r-- | toxcore/DHT.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/toxcore/DHT.h b/toxcore/DHT.h index bb17b3ea..ef3fd0b0 100644 --- a/toxcore/DHT.h +++ b/toxcore/DHT.h | |||
@@ -174,7 +174,7 @@ int pack_ip_port(uint8_t *data, uint16_t length, const IP_Port *ip_port); | |||
174 | * Return size of unpacked ip_port on success. | 174 | * Return size of unpacked ip_port on success. |
175 | * Return -1 on failure. | 175 | * Return -1 on failure. |
176 | */ | 176 | */ |
177 | int unpack_ip_port(IP_Port *ip_port, const uint8_t *data, uint16_t length, uint8_t tcp_enabled); | 177 | int unpack_ip_port(IP_Port *ip_port, const uint8_t *data, uint16_t length, bool tcp_enabled); |
178 | 178 | ||
179 | /* Pack number of nodes into data of maxlength length. | 179 | /* Pack number of nodes into data of maxlength length. |
180 | * | 180 | * |
@@ -191,7 +191,7 @@ int pack_nodes(uint8_t *data, uint16_t length, const Node_format *nodes, uint16_ | |||
191 | * return -1 on failure. | 191 | * return -1 on failure. |
192 | */ | 192 | */ |
193 | int unpack_nodes(Node_format *nodes, uint16_t max_num_nodes, uint16_t *processed_data_len, const uint8_t *data, | 193 | int unpack_nodes(Node_format *nodes, uint16_t max_num_nodes, uint16_t *processed_data_len, const uint8_t *data, |
194 | uint16_t length, uint8_t tcp_enabled); | 194 | uint16_t length, bool tcp_enabled); |
195 | 195 | ||
196 | 196 | ||
197 | /*----------------------------------------------------------------------------------*/ | 197 | /*----------------------------------------------------------------------------------*/ |
@@ -203,7 +203,7 @@ typedef struct Shared_Key { | |||
203 | uint8_t public_key[CRYPTO_PUBLIC_KEY_SIZE]; | 203 | uint8_t public_key[CRYPTO_PUBLIC_KEY_SIZE]; |
204 | uint8_t shared_key[CRYPTO_SHARED_KEY_SIZE]; | 204 | uint8_t shared_key[CRYPTO_SHARED_KEY_SIZE]; |
205 | uint32_t times_requested; | 205 | uint32_t times_requested; |
206 | uint8_t stored; /* 0 if not, 1 if is */ | 206 | bool stored; |
207 | uint64_t time_last_requested; | 207 | uint64_t time_last_requested; |
208 | } Shared_Key; | 208 | } Shared_Key; |
209 | 209 | ||