From fa07a9a09d75d3d5ef9ebd9e34d442d53fa35787 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Mon, 1 Aug 2016 22:22:35 +0200 Subject: [PATCH] ipmi: use C99 designated initializer --- src/ipmi.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ipmi.c b/src/ipmi.c index 8b957e50..2fee9f28 100644 --- a/src/ipmi.c +++ b/src/ipmi.c @@ -547,7 +547,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 +570,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[ ] = { + [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, -- 2.11.0