X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fvarnish.c;h=18f5902fc686a9005fc2fbc15d7f1c4b917bee1d;hb=6f4f918d4d5e70c75471632254ecb9c55fd8d62f;hp=e34ee5691231449e846bbd739ce6dfc6a10ba215;hpb=2f0b03e515cd82e6fd46ff98ea99a0f671f3bc22;p=collectd.git diff --git a/src/varnish.c b/src/varnish.c index e34ee569..18f5902f 100644 --- a/src/varnish.c +++ b/src/varnish.c @@ -117,22 +117,16 @@ static int varnish_submit_gauge (const char *plugin_instance, /* {{{ */ const char *category, const char *type, const char *type_instance, uint64_t gauge_value) { - value_t value; - - value.gauge = (gauge_t) gauge_value; - - return (varnish_submit (plugin_instance, category, type, type_instance, value)); + return (varnish_submit (plugin_instance, category, type, type_instance, + (value_t) { .gauge = (gauge_t) gauge_value })); } /* }}} int varnish_submit_gauge */ static int varnish_submit_derive (const char *plugin_instance, /* {{{ */ const char *category, const char *type, const char *type_instance, uint64_t derive_value) { - value_t value; - - value.derive = (derive_t) derive_value; - - return (varnish_submit (plugin_instance, category, type, type_instance, value)); + return (varnish_submit (plugin_instance, category, type, type_instance, + (value_t) { .derive = (derive_t) derive_value })); } /* }}} int varnish_submit_derive */ #if HAVE_VARNISH_V3 || HAVE_VARNISH_V4 @@ -1134,8 +1128,8 @@ static int varnish_config_instance (const oconfig_item_t *ci) /* {{{ */ /* callback = */ varnish_read, /* interval = */ 0, &(user_data_t) { - ud.data = conf, - ud.free_func = varnish_config_free, + .data = conf, + .free_func = varnish_config_free, }); have_instance = 1;