X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Ftokyotyrant.c;h=09ee25d72f115b1ed09e5d02ce7abf549b326d26;hb=71d2e21ff496bc9ce2d0e6a59853442f71a57c9c;hp=dd1fb3a050825187b17dec0291e77454399cc311;hpb=2079ee1517e34de372f58e7e2267ad5c71a8a41f;p=collectd.git diff --git a/src/tokyotyrant.c b/src/tokyotyrant.c index dd1fb3a0..09ee25d7 100644 --- a/src/tokyotyrant.c +++ b/src/tokyotyrant.c @@ -72,14 +72,11 @@ static void printerr(void) { ERROR("tokyotyrant plugin: error: %d, %s", ecode, tcrdberrmsg(ecode)); } -static void tt_submit(gauge_t val, const char *type) { - value_t values[1]; +static void tt_submit(gauge_t value, const char *type) { 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)); @@ -153,5 +150,3 @@ void module_register(void) { plugin_register_read("tokyotyrant", tt_read); plugin_register_shutdown("tokyotyrant", tt_shutdown); } - -/* vim: set sw=8 ts=8 tw=78 : */