X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fntpd.c;h=bc81cdd8ad47f059748d4b3e239e69e28e66450a;hb=01d23e3f5daf016d03f82d92a76be2fe3decdca4;hp=4ed4e7c8f2625430821ce71baefddac7ee2b6f94;hpb=6c082e955466f0c451d608fb3cbb31481c02fa37;p=collectd.git diff --git a/src/ntpd.c b/src/ntpd.c index 4ed4e7c8..bc81cdd8 100644 --- a/src/ntpd.c +++ b/src/ntpd.c @@ -292,16 +292,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));