X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Faquaero.c;h=8872409fcc118c691c4a0a85cdbdf0e14c00fb6b;hb=d425636110c5fb146d1f6205e2749218f3c31076;hp=81a4efd4337257865dd78d293d065572c3aa7b7e;hpb=6159b6f81403b90eb2b1f1c60fa8006cd3405d1b;p=collectd.git diff --git a/src/aquaero.c b/src/aquaero.c index 81a4efd4..8872409f 100644 --- a/src/aquaero.c +++ b/src/aquaero.c @@ -60,19 +60,15 @@ 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));