X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fstatsd.c;h=28ee337cfb089154c18948ef4f5a482ed8fa8405;hb=07ba05937aeaedd683656c3912040950dbf4a152;hp=70c1a752fdf8f2a758a30fa3784d12b41b026f11;hpb=f25d207699e013bb47c0083fe56b8358a98f6f4d;p=collectd.git diff --git a/src/statsd.c b/src/statsd.c index 70c1a752..28ee337c 100644 --- a/src/statsd.c +++ b/src/statsd.c @@ -61,22 +61,22 @@ struct statsd_metric_s { }; typedef struct statsd_metric_s statsd_metric_t; -static c_avl_tree_t *metrics_tree = NULL; +static c_avl_tree_t *metrics_tree; static pthread_mutex_t metrics_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_t network_thread; static bool network_thread_running; static bool network_thread_shutdown; -static char *conf_node = NULL; -static char *conf_service = NULL; +static char *conf_node; +static char *conf_service; static bool conf_delete_counters; static bool conf_delete_timers; static bool conf_delete_gauges; static bool conf_delete_sets; -static double *conf_timer_percentile = NULL; +static double *conf_timer_percentile; static size_t conf_timer_percentile_num; static bool conf_counter_sum; @@ -666,7 +666,7 @@ static int statsd_init(void) /* {{{ */ return status; } } - network_thread_running = 1; + network_thread_running = true; pthread_mutex_unlock(&metrics_lock); @@ -876,11 +876,11 @@ static int statsd_shutdown(void) /* {{{ */ void *value; if (network_thread_running) { - network_thread_shutdown = 1; + network_thread_shutdown = true; pthread_kill(network_thread, SIGTERM); pthread_join(network_thread, /* retval = */ NULL); } - network_thread_running = 0; + network_thread_running = false; pthread_mutex_lock(&metrics_lock);