X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcontextswitch.c;h=1d73f0417d0d125401def305d9bf76e8d6634511;hb=6ce52f70cc1e6450df3454f19743a29295b84050;hp=d91c0738fd0c77825a3e91b5c7a73755a9cea7de;hpb=79963d13c1884d1d92667cc502ad20758b084a12;p=collectd.git diff --git a/src/contextswitch.c b/src/contextswitch.c index d91c0738..1d73f041 100644 --- a/src/contextswitch.c +++ b/src/contextswitch.c @@ -48,14 +48,10 @@ #endif static void cs_submit(derive_t context_switches) { - value_t values[1]; value_list_t vl = VALUE_LIST_INIT; - values[0].derive = (derive_t)context_switches; - - vl.values = values; + vl.values = &(value_t){.derive = context_switches}; vl.values_len = 1; - sstrncpy(vl.host, hostname_g, sizeof(vl.host)); sstrncpy(vl.plugin, "contextswitch", sizeof(vl.plugin)); sstrncpy(vl.type, "contextswitch", sizeof(vl.type));