diff options
author | iphydf <iphydf@users.noreply.github.com> | 2016-09-13 22:01:45 +0100 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2016-09-13 22:01:45 +0100 |
commit | 45d28904b92c825d1ac88be9edae8baabcd4bba1 (patch) | |
tree | 7b1b259ba09d35867c141cf072707e6a0891f97a /toxcore/onion.c | |
parent | a8823830d39bdbde8d4f4f34bfcb26dc4bf79741 (diff) |
Use <stdbool.h> and replace _Bool with bool.
This header is a requirement for the public API, therefore is assumed to
exist. It is a C99 standard library header, and _Bool is not intended to
be used directly, except in legacy code that defines bool (and
true/false) itself. We don't use or depend on such code. None of our
client code uses or depends on such code. There is no reason to not use
bool.
Diffstat (limited to 'toxcore/onion.c')
-rw-r--r-- | toxcore/onion.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/onion.c b/toxcore/onion.c index ba3f1f4a..5e5fd135 100644 --- a/toxcore/onion.c +++ b/toxcore/onion.c | |||
@@ -62,7 +62,7 @@ static void ip_pack(uint8_t *data, IP source) | |||
62 | } | 62 | } |
63 | 63 | ||
64 | /* return 0 on success, -1 on failure. */ | 64 | /* return 0 on success, -1 on failure. */ |
65 | static int ip_unpack(IP *target, const uint8_t *data, unsigned int data_size, _Bool disable_family_check) | 65 | static int ip_unpack(IP *target, const uint8_t *data, unsigned int data_size, bool disable_family_check) |
66 | { | 66 | { |
67 | if (data_size < (1 + SIZE_IP6)) { | 67 | if (data_size < (1 + SIZE_IP6)) { |
68 | return -1; | 68 | return -1; |
@@ -91,7 +91,7 @@ static void ipport_pack(uint8_t *data, const IP_Port *source) | |||
91 | } | 91 | } |
92 | 92 | ||
93 | /* return 0 on success, -1 on failure. */ | 93 | /* return 0 on success, -1 on failure. */ |
94 | static int ipport_unpack(IP_Port *target, const uint8_t *data, unsigned int data_size, _Bool disable_family_check) | 94 | static int ipport_unpack(IP_Port *target, const uint8_t *data, unsigned int data_size, bool disable_family_check) |
95 | { | 95 | { |
96 | if (data_size < (SIZE_IP + SIZE_PORT)) { | 96 | if (data_size < (SIZE_IP + SIZE_PORT)) { |
97 | return -1; | 97 | return -1; |