Code

src/daemon/plugin.c: Don't copy values twice.
[collectd.git] / src / olsrd.c
index 899ad3e8f2ef4e565cb782c4290f8cfbf08f39cf..3bf71280b46b51d4e1690472fac2feb1b4633d93 100644 (file)
@@ -216,12 +216,9 @@ __attribute__ ((nonnull(2)))
 static void olsrd_submit (const char *plugin_instance, /* {{{ */
     const char *type, const char *type_instance, gauge_t value)
 {
-  value_t values[1];
   value_list_t vl = VALUE_LIST_INIT;
 
-  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));