diff --git a/memcached.c b/memcached.c index 12322decbc..8205da98e5 100644 --- a/memcached.c +++ b/memcached.c @@ -161,7 +161,7 @@ static void stats_init(void) { stats.curr_items = stats.total_items = stats.curr_conns = stats.total_conns = stats.conn_structs = 0; stats.get_cmds = stats.set_cmds = stats.get_hits = stats.get_misses = stats.evictions = 0; stats.curr_bytes = stats.listen_disabled_num = 0; - stats.accepting_conns = 1; /* assuming we start in this state. */ + stats.accepting_conns = true; /* assuming we start in this state. */ /* make the time we started always be 2 seconds before we really did, so time(0) - time.started is never zero. if so, things @@ -3248,11 +3248,11 @@ void accept_new_conns(const bool do_accept) { if (do_accept) { STATS_LOCK(); - stats.accepting_conns = 1; + stats.accepting_conns = true; STATS_UNLOCK(); } else { STATS_LOCK(); - stats.accepting_conns = 0; + stats.accepting_conns = false; stats.listen_disabled_num++; STATS_UNLOCK(); } diff --git a/memcached.h b/memcached.h index 3ca2eef8db..20a145e05a 100644 --- a/memcached.h +++ b/memcached.h @@ -109,7 +109,7 @@ struct stats { uint64_t get_misses; uint64_t evictions; time_t started; /* when the process was started */ - unsigned int accepting_conns; /* whether we are currently accepting */ + bool accepting_conns; /* whether we are currently accepting */ uint64_t listen_disabled_num; };