X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcontextswitch.c;h=834fbd74cd9182c7931c6a2ce898cb98650c01cc;hb=a762b2b4a6d804139c9ab5f47afacc1a88d6c0c1;hp=344f76e76f0c29242ac20821d8efb25f83f12871;hpb=b22ffd9cb1938b4931d7628420a9f0b50461333f;p=collectd.git diff --git a/src/contextswitch.c b/src/contextswitch.c index 344f76e7..834fbd74 100644 --- a/src/contextswitch.c +++ b/src/contextswitch.c @@ -22,6 +22,7 @@ **/ #include "collectd.h" + #include "common.h" #include "plugin.h" @@ -48,14 +49,10 @@ 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));