X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fntpd.c;h=21b65f5888b3fb30df46c7f7d936422e9c7c7f69;hb=f70935ddfb05b03de6e6dff95d842cb7c553e8b9;hp=1cb59dee56db698165b0221660e670b5b7d15284;hpb=79963d13c1884d1d92667cc502ad20758b084a12;p=collectd.git diff --git a/src/ntpd.c b/src/ntpd.c index 1cb59dee..21b65f58 100644 --- a/src/ntpd.c +++ b/src/ntpd.c @@ -32,9 +32,6 @@ #include "common.h" #include "plugin.h" -#if HAVE_STDINT_H -#include -#endif #if HAVE_NETDB_H #include #endif @@ -292,16 +289,11 @@ static int ntpd_config(const char *key, const char *value) { static void ntpd_submit(const char *type, const char *type_inst, gauge_t value) { - value_t values[1]; value_list_t vl = VALUE_LIST_INIT; - values[0].gauge = value; - - vl.values = values; + vl.values = &(value_t){.gauge = value}; vl.values_len = 1; - sstrncpy(vl.host, hostname_g, sizeof(vl.host)); sstrncpy(vl.plugin, "ntpd", sizeof(vl.plugin)); - sstrncpy(vl.plugin_instance, "", sizeof(vl.plugin_instance)); sstrncpy(vl.type, type, sizeof(vl.type)); sstrncpy(vl.type_instance, type_inst, sizeof(vl.type_instance));