X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Faquaero.c;h=4a78f6859c5fc048ddefbb8a7ac555de94a350a5;hb=f7e2d82c4d016df72c55e85bb9c5bc9ba08d5f91;hp=412f3000267c0c58c1f661623516b15b9ebad6ee;hpb=2079ee1517e34de372f58e7e2267ad5c71a8a41f;p=collectd.git diff --git a/src/aquaero.c b/src/aquaero.c index 412f3000..4a78f685 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));