X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fapache.c;h=c02dfe0fb19588b5d54bd6e90f534c85f9403fa9;hb=a302b46b0f8b178ea6e360e21a525273598bf652;hp=e10a15d46a01e4b9ba6a429d7ecb16861d022a10;hpb=88ad924df0622911c555cea6826933732e91d9cd;p=collectd.git diff --git a/src/apache.c b/src/apache.c index e10a15d4..c02dfe0f 100644 --- a/src/apache.c +++ b/src/apache.c @@ -239,11 +239,6 @@ static int config_add (oconfig_item_t *ci) if (status == 0) { - user_data_t ud = { - .data = st, - .free_func = apache_free - }; - char callback_name[3*DATA_MAX_NAME_LEN]; ssnprintf (callback_name, sizeof (callback_name), @@ -255,7 +250,11 @@ static int config_add (oconfig_item_t *ci) /* name = */ callback_name, /* callback = */ apache_read_host, /* interval = */ 0, - /* user_data = */ &ud); + &(user_data_t) { + .data = st, + .free_func = apache_free, + }); + } if (status != 0)