X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fstatsd.c;h=34ce586390ad65e8c49d1e0a8ccafe58191013fc;hp=ccd15ebe5668bd878f00269c1539db9e89464b9e;hb=61a4ed99b1a5b6d371bb745933d0efc5dff9505c;hpb=b34cd94ec5b8b46fb0610c020c49f20e6d3980a8 diff --git a/src/statsd.c b/src/statsd.c index ccd15ebe..34ce5863 100644 --- a/src/statsd.c +++ b/src/statsd.c @@ -65,25 +65,25 @@ static c_avl_tree_t *metrics_tree = NULL; static pthread_mutex_t metrics_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_t network_thread; -static _Bool network_thread_running = 0; -static _Bool network_thread_shutdown = 0; +static bool network_thread_running = 0; +static bool network_thread_shutdown = 0; static char *conf_node = NULL; static char *conf_service = NULL; -static _Bool conf_delete_counters = 0; -static _Bool conf_delete_timers = 0; -static _Bool conf_delete_gauges = 0; -static _Bool conf_delete_sets = 0; +static bool conf_delete_counters = 0; +static bool conf_delete_timers = 0; +static bool conf_delete_gauges = 0; +static bool conf_delete_sets = 0; static double *conf_timer_percentile = NULL; static size_t conf_timer_percentile_num = 0; -static _Bool conf_counter_sum = 0; -static _Bool conf_timer_lower = 0; -static _Bool conf_timer_upper = 0; -static _Bool conf_timer_sum = 0; -static _Bool conf_timer_count = 0; +static bool conf_counter_sum = 0; +static bool conf_timer_lower = 0; +static bool conf_timer_upper = 0; +static bool conf_timer_sum = 0; +static bool conf_timer_count = 0; /* Must hold metrics_lock when calling this function. */ static statsd_metric_t *statsd_metric_lookup_unsafe(char const *name, /* {{{ */ @@ -717,7 +717,7 @@ static int statsd_metric_submit_unsafe(char const *name, if (metric->type == STATSD_GAUGE) vl.values[0].gauge = (gauge_t)metric->value; else if (metric->type == STATSD_TIMER) { - _Bool have_events = (metric->updates_num > 0); + bool have_events = (metric->updates_num > 0); /* Make sure all timer metrics share the *same* timestamp. */ vl.time = cdtime();