X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fopenldap.c;h=dd3226d3a193d1478d8f3ec8ce06b0226b01e9fb;hb=51bc7c4a5523f2b03c24e32064b28c7c8426534d;hp=374181dfb2980592449536c8b381847df10e5085;hpb=5cd5988ec752f441254fc887117c3d5aa8f8d094;p=collectd.git diff --git a/src/openldap.c b/src/openldap.c index 374181df..dd3226d3 100644 --- a/src/openldap.c +++ b/src/openldap.c @@ -192,17 +192,13 @@ static void cldap_submit_value (const char *type, const char *type_instance, /* static void cldap_submit_derive (const char *type, const char *type_instance, /* {{{ */ derive_t d, cldap_t *st) { - value_t v; - v.derive = d; - cldap_submit_value (type, type_instance, v, st); + cldap_submit_value (type, type_instance, (value_t) { .derive = d }, st); } /* }}} void cldap_submit_derive */ static void cldap_submit_gauge (const char *type, const char *type_instance, /* {{{ */ gauge_t g, cldap_t *st) { - value_t v; - v.gauge = g; - cldap_submit_value (type, type_instance, v, st); + cldap_submit_value (type, type_instance, (value_t) { .gauge = g }, st); } /* }}} void cldap_submit_gauge */ static int cldap_read_host (user_data_t *ud) /* {{{ */ @@ -667,7 +663,7 @@ static int cldap_config_add (oconfig_item_t *ci) /* {{{ */ /* name = */ callback_name, /* callback = */ cldap_read_host, /* interval = */ 0, - /* user_data = */ &(user_data_t) { + &(user_data_t) { .data = st, }); }