X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fipmi.c;h=d61a8bcb9189ab9d219ff0722cee609c8194cd09;hb=4103105fb43cd72294f165b2541540b3a8a99532;hp=8b957e50584d932b9dda3cfc6a1a76ed493c4714;hpb=69b8a9a1af204685dfdfaf1279a0f2928e0bbb32;p=collectd.git diff --git a/src/ipmi.c b/src/ipmi.c index 8b957e50..d61a8bcb 100644 --- a/src/ipmi.c +++ b/src/ipmi.c @@ -24,6 +24,7 @@ **/ #include "collectd.h" + #include "common.h" #include "plugin.h" #include "utils_ignorelist.h" @@ -547,7 +548,6 @@ static void domain_connection_change_handler (ipmi_domain_t *domain, static int thread_init (os_handler_t **ret_os_handler) { os_handler_t *os_handler; - ipmi_open_option_t open_option[1] = { 0 }; ipmi_con_t *smi_connection = NULL; ipmi_domain_id_t domain_id; int status; @@ -571,8 +571,12 @@ static int thread_init (os_handler_t **ret_os_handler) return (-1); } - open_option[0].option = IPMI_OPEN_OPTION_ALL; - open_option[0].ival = 1; + ipmi_open_option_t open_option[1] = { + [0] = { + .option = IPMI_OPEN_OPTION_ALL, + { .ival = 1 } + } + }; status = ipmi_open_domain ("mydomain", &smi_connection, /* num_con = */ 1, domain_connection_change_handler, /* user data = */ NULL,