Code

collectd.conf(5): Fix typos.
[collectd.git] / src / aquaero.c
index 81a4efd4337257865dd78d293d065572c3aa7b7e..8872409fcc118c691c4a0a85cdbdf0e14c00fb6b 100644 (file)
@@ -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));