X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Ftokyotyrant.c;h=154215f867bcc16ed0c6e4cec866883628c3af6c;hb=1aa4295ba6875ceb02a7383237bc2485ffab9c1e;hp=7c6d9129e709ee9b71a30a3a57848fc9fca56b06;hpb=02f8dbc0985310574ea2837cd5e3c06cccda203d;p=collectd.git diff --git a/src/tokyotyrant.c b/src/tokyotyrant.c index 7c6d9129..154215f8 100644 --- a/src/tokyotyrant.c +++ b/src/tokyotyrant.c @@ -86,15 +86,12 @@ static void printerr (void) ecode, tcrdberrmsg(ecode)); } -static void tt_submit (gauge_t val, const char* type) +static void tt_submit (gauge_t value, const char* type) { - value_t values[1]; value_list_t vl = VALUE_LIST_INIT; - values[0].gauge = val; - - vl.values = values; - vl.values_len = STATIC_ARRAY_SIZE (values); + vl.values = &(value_t) { .gauge = value }; + vl.values_len = 1; sstrncpy (vl.host, config_host, sizeof (vl.host)); sstrncpy (vl.plugin, "tokyotyrant", sizeof (vl.plugin));