X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcollectd-tg.c;h=4669c655754b2a1a8191a12657d8b5c6ed70f661;hb=d486225f89ea52d8ed2b4242eba2ad94c409f837;hp=85c5c1b68fd169ae6982f4e47b8e4a6a7d4b0198;hpb=61a4ed99b1a5b6d371bb745933d0efc5dff9505c;p=collectd.git diff --git a/src/collectd-tg.c b/src/collectd-tg.c index 85c5c1b6..4669c655 100644 --- a/src/collectd-tg.c +++ b/src/collectd-tg.c @@ -62,12 +62,12 @@ static const char *conf_service = NET_DEFAULT_PORT; static lcc_network_t *net; -static c_heap_t *values_heap = NULL; +static c_heap_t *values_heap; static struct sigaction sigint_action; static struct sigaction sigterm_action; -static bool loop = 1; +static bool loop = true; __attribute__((noreturn)) static void exit_usage(int exit_status) /* {{{ */ { @@ -95,9 +95,9 @@ __attribute__((noreturn)) static void exit_usage(int exit_status) /* {{{ */ exit(exit_status); } /* }}} void exit_usage */ -static void signal_handler(int signal) /* {{{ */ +static void signal_handler(int __attribute__((unused)) signal) /* {{{ */ { - loop = 0; + loop = false; } /* }}} void signal_handler */ #if HAVE_CLOCK_GETTIME @@ -147,7 +147,8 @@ static int get_boundet_random(int min, int max) /* {{{ */ range = max - min; - return min + ((int)(((double)range) * ((double)random()) / (((double)RAND_MAX) + 1.0))); + return min + ((int)(((double)range) * ((double)random()) / + (((double)RAND_MAX) + 1.0))); } /* }}} int get_boundet_random */ static lcc_value_list_t *create_value_list(void) /* {{{ */