projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tree wide: Use user_data_t compound literal where appropriate.
[collectd.git]
/
src
/
netapp.c
diff --git
a/src/netapp.c
b/src/netapp.c
index
26577da
..
1c9b21c
100644
(file)
--- a/
src/netapp.c
+++ b/
src/netapp.c
@@
-2872,7
+2872,6
@@
static int cna_read (user_data_t *ud);
static int cna_register_host (host_config_t *host) /* {{{ */
{
char cb_name[256];
static int cna_register_host (host_config_t *host) /* {{{ */
{
char cb_name[256];
- user_data_t ud = { 0 };
if (host->vfiler)
ssnprintf (cb_name, sizeof (cb_name), "netapp-%s-%s",
if (host->vfiler)
ssnprintf (cb_name, sizeof (cb_name), "netapp-%s-%s",
@@
-2880,13
+2879,13
@@
static int cna_register_host (host_config_t *host) /* {{{ */
else
ssnprintf (cb_name, sizeof (cb_name), "netapp-%s", host->name);
else
ssnprintf (cb_name, sizeof (cb_name), "netapp-%s", host->name);
- ud.data = host;
- ud.free_func = (void (*) (void *)) free_host_config;
-
plugin_register_complex_read (/* group = */ NULL, cb_name,
/* callback = */ cna_read,
/* interval = */ host->interval,
plugin_register_complex_read (/* group = */ NULL, cb_name,
/* callback = */ cna_read,
/* interval = */ host->interval,
- /* user data = */ &ud);
+ /* user data = */ &(user_data_t) {
+ .data = host,
+ .free_func = (void *) free_host_config,
+ });
return (0);
} /* }}} int cna_register_host */
return (0);
} /* }}} int cna_register_host */