X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fcollectd-tg.c;h=2d83bbfe1b9c5e8412007bd12ec50f8e8ee1cefa;hp=64547b8097f3589038cd32691ff889cabb3cca6f;hb=7f07c55bac640c7a50d516248a3152235a14af59;hpb=6e41c3b1f024d7944e5e8010a87933555c662474 diff --git a/src/collectd-tg.c b/src/collectd-tg.c index 64547b80..2d83bbfe 100644 --- a/src/collectd-tg.c +++ b/src/collectd-tg.c @@ -62,7 +62,7 @@ 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; @@ -95,7 +95,7 @@ __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 = false; } /* }}} void signal_handler */ @@ -105,7 +105,7 @@ static double dtime(void) /* {{{ */ { struct timespec ts = {0}; - if (clock_gettime(CLOCK_MONOTONIC, &ts) != 0) + if (clock_gettime(CLOCK_REALTIME, &ts) != 0) perror("clock_gettime"); return (double)ts.tv_sec + (double)ts.tv_nsec / 1e9;