X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fipc.c;h=8222efbab42148c2a542aa609653bdf849e4751b;hb=cb262c0e23692b6374d57ad3b3decb0d6c397949;hp=d06b0e3a3d06e9075316df7907e5ae32569eda35;hpb=79963d13c1884d1d92667cc502ad20758b084a12;p=collectd.git diff --git a/src/ipc.c b/src/ipc.c index d06b0e3a..8222efba 100644 --- 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 : */