]> jfr.im git - solanum.git/commitdiff
More bool conversions
authorElizabeth Myers <redacted>
Wed, 9 Mar 2016 08:19:31 +0000 (02:19 -0600)
committerElizabeth Myers <redacted>
Wed, 9 Mar 2016 08:19:31 +0000 (02:19 -0600)
extensions/sno_farconnect.c
extensions/sno_globalnickchange.c
include/ircd.h
ircd/ircd.c
ircd/modules.c
ircd/s_conf.c
ircd/sslproc.c
ssld/ssld.c

index 9638592a429272eb3691ea4b076c6bc23e81ea11..7878065882c5f6ddd796733bc7bcd09fd5a7057a 100644 (file)
@@ -38,7 +38,7 @@ _modinit(void)
        snomask_modes['F'] = find_snomask_slot();
 
        /* show the fact that we are showing user information in /version */
-       opers_see_all_users = 1;
+       opers_see_all_users = true;
 
        return 0;
 }
index 9c53d48da08c829f8a1b625d6ad6a89163ece843..0e338c5cc785f809abfbd30e3799f2744e9a911a 100644 (file)
@@ -28,7 +28,7 @@ static int
 _modinit(void)
 {
        /* show the fact that we are showing user information in /version */
-       opers_see_all_users = 1;
+       opers_see_all_users = true;
 
        return 0;
 }
index 3e941452ee1cced1c325aca6cb861841c2df07ff..48e901eb8d4cf2dff98b1ca0493983404e02e691 100644 (file)
@@ -69,9 +69,9 @@ 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
-                                  accountability, etc */
+extern bool server_state_foreground;
+extern bool opers_see_all_users; /* sno_farconnect.so loaded, operspy without
+                                   accountability, etc */
 
 extern struct Client me;
 extern rb_dlink_list global_client_list;
@@ -99,8 +99,8 @@ extern int testing_conf;
 
 extern struct ev_entry *check_splitmode_ev;
 
-extern int ssl_ok;
-extern int zlib_ok;
+extern bool ssl_ok;
+extern bool zlib_ok;
 extern int maxconnections;
 
 void ircd_shutdown(const char *reason);
index 9343b6bc8be05ec53825192247525175c05ebbaa..c96edb32cd45ae626f7841be42d1e52ab0771629 100644 (file)
@@ -103,10 +103,10 @@ bool dorehash = false;
 bool dorehashbans = false;
 bool doremotd = false;
 bool kline_queued = false;
-int server_state_foreground = 0;
-int opers_see_all_users = 0;
-int ssl_ok = 0;
-int zlib_ok = 1;
+bool server_state_foreground = false;
+bool opers_see_all_users = false;
+bool ssl_ok = false;
+bool zlib_ok = true;
 
 int testing_conf = 0;
 time_t startup_time;
@@ -605,7 +605,7 @@ charybdis_main(int argc, char *argv[])
        setup_signals();
 
        if (testing_conf)
-               server_state_foreground = 1;
+               server_state_foreground = true;
 
        /* Make sure fd 0, 1 and 2 are in use -- jilles */
        do
@@ -713,10 +713,10 @@ charybdis_main(int argc, char *argv[])
                if(!rb_setup_ssl_server(ServerInfo.ssl_cert, ServerInfo.ssl_private_key, ServerInfo.ssl_dh_params, ServerInfo.ssl_cipher_list))
                {
                        ilog(L_MAIN, "WARNING: Unable to setup SSL.");
-                       ssl_ok = 0;
+                       ssl_ok = false;
                }
                else
-                       ssl_ok = 1;
+                       ssl_ok = true;
        }
 
        if (testing_conf)
index 395559a61fabda2c3438592d58c92aa56a5d6cdc..8175c6246607266c3b83db2a293479551a1ac938 100644 (file)
@@ -295,7 +295,7 @@ load_one_module(const char *path, int origin, int coremodule)
 
        struct stat statbuf;
 
-       if (server_state_foreground == 1)
+       if (server_state_foreground)
                inotice("loading module %s ...", path);
 
        if(coremodule != 0)
index d952981b427856e45386ece170a390ecafa8e2aa..aaa9f86781b424475aa453917737ca03781eea34 100644 (file)
@@ -868,9 +868,9 @@ validate_conf(void)
        if(!rb_setup_ssl_server(ServerInfo.ssl_cert, ServerInfo.ssl_private_key, ServerInfo.ssl_dh_params, ServerInfo.ssl_cipher_list))
        {
                ilog(L_MAIN, "WARNING: Unable to setup SSL.");
-               ssl_ok = 0;
+               ssl_ok = false;
        } else {
-               ssl_ok = 1;
+               ssl_ok = true;
                send_new_ssl_certs(ServerInfo.ssl_cert, ServerInfo.ssl_private_key, ServerInfo.ssl_dh_params, ServerInfo.ssl_cipher_list);
        }
 
index f9f26eafe0ed1c55c7dbdcf2d0fcac7240a02b09..9f01f2290aecca6e6927972d17093385141f67ff 100644 (file)
@@ -489,7 +489,7 @@ ssl_process_cmd_recv(ssl_ctl_t * ctl)
                switch (*ctl_buf->buf)
                {
                case 'N':
-                       ssl_ok = 0;     /* ssld says it can't do ssl/tls */
+                       ssl_ok = false; /* ssld says it can't do ssl/tls */
                        break;
                case 'D':
                        ssl_process_dead_fd(ctl, ctl_buf);
@@ -504,13 +504,13 @@ ssl_process_cmd_recv(ssl_ctl_t * ctl)
                        ssl_process_zipstats(ctl, ctl_buf);
                        break;
                case 'I':
-                       ssl_ok = 0;
+                       ssl_ok = false;
                        ilog(L_MAIN, "%s", cannot_setup_ssl);
                        sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s", cannot_setup_ssl);
                        break;
                case 'U':
                        zlib_ok = 0;
-                       ssl_ok = 0;
+                       ssl_ok = false;
                        ilog(L_MAIN, "%s", no_ssl_or_zlib);
                        sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s", no_ssl_or_zlib);
                        ssl_killall();
@@ -722,7 +722,7 @@ send_new_ssl_certs(const char *ssl_cert, const char *ssl_private_key, const char
        rb_dlink_node *ptr;
        if(ssl_cert == NULL || ssl_private_key == NULL || ssl_dh_params == NULL)
        {
-               ssl_ok = 0;
+               ssl_ok = false;
                return;
        }
        RB_DLINK_FOREACH(ptr, ssl_daemons.head)
index 32f95fb42a5c10b9666dd4950a7b7aa2e9997058..6446a6562d38dfc7ada852c8c00d0e1cc7f16d2e 100644 (file)
@@ -151,12 +151,12 @@ static void conn_plain_read_cb(rb_fde_t *fd, void *data);
 static void conn_plain_read_shutdown_cb(rb_fde_t *fd, void *data);
 static void mod_cmd_write_queue(mod_ctl_t * ctl, const void *data, size_t len);
 static const char *remote_closed = "Remote host closed the connection";
-static int ssl_ok;
+static bool ssl_ok;
 static int certfp_method = RB_SSL_CERTFP_METH_SHA1;
 #ifdef HAVE_LIBZ
-static int zlib_ok = 1;
+static bool zlib_ok = true;
 #else
-static int zlib_ok = 0;
+static bool zlib_ok = false;
 #endif