From 45d28904b92c825d1ac88be9edae8baabcd4bba1 Mon Sep 17 00:00:00 2001 From: iphydf Date: Tue, 13 Sep 2016 22:01:45 +0100 Subject: Use 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. --- toxcore/onion_client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'toxcore/onion_client.c') diff --git a/toxcore/onion_client.c b/toxcore/onion_client.c index 0dca8525..04822cc1 100644 --- a/toxcore/onion_client.c +++ b/toxcore/onion_client.c @@ -213,7 +213,7 @@ static int is_path_used(const Onion_Client_Paths *onion_paths, const Node_format } /* is path timed out */ -static _Bool path_timed_out(Onion_Client_Paths *onion_paths, uint32_t pathnum) +static bool path_timed_out(Onion_Client_Paths *onion_paths, uint32_t pathnum) { pathnum = pathnum % NUMBER_ONION_PATHS; @@ -275,7 +275,7 @@ static int random_path(const Onion_Client *onion_c, Onion_Client_Paths *onion_pa } /* Does path with path_num exist. */ -static _Bool path_exists(Onion_Client_Paths *onion_paths, uint32_t path_num) +static bool path_exists(Onion_Client_Paths *onion_paths, uint32_t path_num) { if (path_timed_out(onion_paths, path_num)) { return 0; @@ -1577,7 +1577,7 @@ void do_onion_client(Onion_Client *onion_c) } } - _Bool UDP_connected = DHT_non_lan_connected(onion_c->dht); + bool UDP_connected = DHT_non_lan_connected(onion_c->dht); if (is_timeout(onion_c->first_run, ONION_CONNECTION_SECONDS * 2)) { set_tcp_onion_status(onion_c->c->tcp_c, !UDP_connected); -- cgit v1.2.3