Tree wide: Use compound literals when dealing with value_t.
[collectd.git] / src / lvm.c
index 6b9a031..77cb6eb 100644 (file)
--- a/src/lvm.c
+++ b/src/lvm.c
@@ -55,12 +55,9 @@ static char const *get_lv_property_string(lv_t lv, char const *property)
 static void lvm_submit (char const *plugin_instance, char const *type_instance,
         uint64_t ivalue)
 {
-    value_t v;
     value_list_t vl = VALUE_LIST_INIT;
 
-    v.gauge = (gauge_t) ivalue;
-
-    vl.values = &v;
+    vl.values = &(value_t) { .gauge = (gauge_t) ivalue };
     vl.values_len = 1;
 
     sstrncpy(vl.host, hostname_g, sizeof (vl.host));