X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Faquaero.c;h=22278e03c2b4bde0523d9c3a7904a39583b8dba5;hb=fb0cc621d4357bbe4a9dc36c7f055f46257ce57c;hp=412f3000267c0c58c1f661623516b15b9ebad6ee;hpb=2079ee1517e34de372f58e7e2267ad5c71a8a41f;p=collectd.git diff --git a/src/aquaero.c b/src/aquaero.c index 412f3000..22278e03 100644 --- a/src/aquaero.c +++ b/src/aquaero.c @@ -54,19 +54,15 @@ static int aquaero_shutdown(void) { static void aquaero_submit(const char *type, const char *type_instance, double value) { const char *instance = conf_device ? conf_device : "default"; - value_t values[1]; value_list_t vl = VALUE_LIST_INIT; /* Don't report undefined values. */ if (value == AQ5_FLOAT_UNDEF) return; - 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, "aquaero", sizeof(vl.plugin)); sstrncpy(vl.plugin_instance, instance, sizeof(vl.plugin_instance)); sstrncpy(vl.type, type, sizeof(vl.type)); @@ -165,5 +161,3 @@ void module_register(void) { plugin_register_read("aquaero", aquaero_read); plugin_register_shutdown("aquaero", aquaero_shutdown); } /* void module_register */ - -/* vim: set sw=8 sts=8 noet : */