X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcontextswitch.c;h=3bd6d9f53cc849421760fa211dfab9caddb106a7;hb=50ad45a6a6c68119823d56c1ccec74135ba744f9;hp=76e2a6c0b935c9225d50e96e7c2405554f459476;hpb=02f8dbc0985310574ea2837cd5e3c06cccda203d;p=collectd.git diff --git a/src/contextswitch.c b/src/contextswitch.c index 76e2a6c0..3bd6d9f5 100644 --- a/src/contextswitch.c +++ b/src/contextswitch.c @@ -49,12 +49,9 @@ 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));