Tree wide: Use compound literals when dealing with value_t.
[collectd.git] / src / apple_sensors.c
index 48fbcb9..06ca7a8 100644 (file)
@@ -83,15 +83,9 @@ static int as_init (void)
 static void as_submit (const char *type, const char *type_instance,
                double val)
 {
-       value_t values[1];
        value_list_t vl = VALUE_LIST_INIT;
 
-       DEBUG ("type = %s; type_instance = %s; val = %f;",
-                       type, type_instance, val);
-
-       values[0].gauge = val;
-
-       vl.values = values;
+       vl.values = &(value_t) { .gauge = val };
        vl.values_len = 1;
        sstrncpy (vl.host, hostname_g, sizeof (vl.host));
        sstrncpy (vl.plugin, "apple_sensors", sizeof (vl.plugin));