command parser: Add a vector-based interface.
[collectd.git] / src / sensors.c
index 4f3d0d6..f13b3ea 100644 (file)
@@ -481,12 +481,11 @@ static int sensors_shutdown (void)
 
 static void sensors_submit (const char *plugin_instance,
                const char *type, const char *type_instance,
-               double val)
+               double value)
 {
        char match_key[1024];
        int status;
 
-       value_t values[1];
        value_list_t vl = VALUE_LIST_INIT;
 
        status = ssnprintf (match_key, sizeof (match_key), "%s/%s-%s",
@@ -501,9 +500,7 @@ static void sensors_submit (const char *plugin_instance,
                        return;
        }
 
-       values[0].gauge = val;
-
-       vl.values = values;
+       vl.values = &(value_t) { .gauge = value };
        vl.values_len = 1;
 
        sstrncpy (vl.host, hostname_g, sizeof (vl.host));