Tree wide: Use compound literals when dealing with value_t.
[collectd.git] / src / irq.c
index 0f1d3f0..cb444a4 100644 (file)
--- a/src/irq.c
+++ b/src/irq.c
@@ -72,15 +72,12 @@ static int irq_config (const char *key, const char *value)
 
 static void irq_submit (const char *irq_name, derive_t value)
 {
-       value_t values[1];
        value_list_t vl = VALUE_LIST_INIT;
 
        if (ignorelist_match (ignorelist, irq_name) != 0)
                return;
 
-       values[0].derive = value;
-
-       vl.values = values;
+       vl.values = &(value_t) { .derive = value };
        vl.values_len = 1;
        sstrncpy (vl.host, hostname_g, sizeof (vl.host));
        sstrncpy (vl.plugin, "irq", sizeof (vl.plugin));