]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-settings: test-settings - Refactor initialization of params3
authorAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 28 Mar 2025 06:08:53 +0000 (08:08 +0200)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 28 Mar 2025 06:12:03 +0000 (08:12 +0200)
Satisfies older compilers

src/lib-settings/test-settings.c

index f8ffeec62cc9e19ce8e34c23d2c5b915e45192cc..5236570b30f0a36b5050ce80c6a8553dc1623aec 100644 (file)
@@ -293,17 +293,17 @@ static void test_var_expand_hierarchy(void)
                .context = context2,
        };
 
-       struct var_expand_params params3 = {
-               .tables_arr = (const struct var_expand_table *const[]) {
-                       tab1,
-                       tab1,
-                       NULL
-               },
-               .contexts = (void *const[]) {
-                       context1,
-                       context1,
-                       VAR_EXPAND_CONTEXTS_END,
-               }
+       struct var_expand_params params3;
+       i_zero(&params3);
+       params3.tables_arr = (const struct var_expand_table *const[]) {
+               tab1,
+               tab1,
+               NULL
+       };
+       params3.contexts = (void *const[]) {
+               context1,
+               context1,
+               VAR_EXPAND_CONTEXTS_END,
        };
 
        struct settings_root *set_root = settings_root_init();