python: Addressed review comments
[collectd.git] / src / ipc.c
index d06b0e3..8222efb 100644 (file)
--- a/src/ipc.c
+++ b/src/ipc.c
@@ -95,14 +95,10 @@ __attribute__((nonnull(1))) static void
 ipc_submit_g(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));
   sstrncpy(vl.plugin, "ipc", sizeof(vl.plugin));
   sstrncpy(vl.plugin_instance, plugin_instance, sizeof(vl.plugin_instance));
   sstrncpy(vl.type, type, sizeof(vl.type));
@@ -323,5 +319,3 @@ void module_register(void) /* {{{ */
   plugin_register_read("ipc", ipc_read);
 }
 /* }}} */
-
-/* vim: set sw=2 sts=2 et fdm=marker : */