From 818c157a6da985bedd42eb740ceeeb3813930922 Mon Sep 17 00:00:00 2001 From: Elizabeth Myers Date: Wed, 9 Mar 2016 02:06:21 -0600 Subject: [PATCH] More bool conversions [ci skip] --- include/ircd.h | 6 +++--- ircd/ircd.c | 12 ++++++------ ircd/ircd_signal.c | 12 ++++++------ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/include/ircd.h b/include/ircd.h index 1e6e52f5a..3e941452e 100644 --- a/include/ircd.h +++ b/include/ircd.h @@ -65,9 +65,9 @@ extern const unsigned long int datecode; extern const char *ircd_version; extern const char *logFileName; extern const char *pidFileName; -extern int dorehash; -extern int dorehashbans; -extern int doremotd; +extern bool dorehash; +extern bool dorehashbans; +extern bool doremotd; extern bool kline_queued; extern int server_state_foreground; extern int opers_see_all_users; /* sno_farconnect.so loaded, operspy without diff --git a/ircd/ircd.c b/ircd/ircd.c index e87689e80..9343b6bc8 100644 --- a/ircd/ircd.c +++ b/ircd/ircd.c @@ -99,9 +99,9 @@ const char *logFileName = LPATH; const char *pidFileName = PPATH; char **myargv; -int dorehash = 0; -int dorehashbans = 0; -int doremotd = 0; +bool dorehash = false; +bool dorehashbans = false; +bool doremotd = false; bool kline_queued = false; int server_state_foreground = 0; int opers_see_all_users = 0; @@ -278,13 +278,13 @@ check_rehash(void *unused) if(dorehash) { rehash(1); - dorehash = 0; + dorehash = false; } if(dorehashbans) { rehash_bans(1); - dorehashbans = 0; + dorehashbans = false; } if(doremotd) @@ -292,7 +292,7 @@ check_rehash(void *unused) sendto_realops_snomask(SNO_GENERAL, L_ALL, "Got signal SIGUSR1, reloading ircd motd file"); cache_user_motd(); - doremotd = 0; + doremotd = false; } } diff --git a/ircd/ircd_signal.c b/ircd/ircd_signal.c index 0cae2c36a..b60172952 100644 --- a/ircd/ircd_signal.c +++ b/ircd/ircd_signal.c @@ -64,7 +64,7 @@ sigterm_handler(int sig) static void sighup_handler(int sig) { - dorehash = 1; + dorehash = true; } /* @@ -73,13 +73,13 @@ sighup_handler(int sig) static void sigusr1_handler(int sig) { - doremotd = 1; + doremotd = true; } static void sigusr2_handler(int sig) { - dorehashbans = 1; + dorehashbans = true; } /* @@ -88,7 +88,7 @@ sigusr2_handler(int sig) static void sigint_handler(int sig) { - static int restarting = 0; + static bool restarting = false; if(server_state_foreground) { @@ -98,9 +98,9 @@ sigint_handler(int sig) else { ilog(L_MAIN, "Server Restarting on SIGINT"); - if(restarting == 0) + if(!restarting) { - restarting = 1; + restarting = true; server_reboot(); } }