]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-settings: test-settings-parser - Always use designated initializers for setting...
authorStephan Bosch <stephan.bosch@open-xchange.com>
Tue, 3 Sep 2024 18:16:13 +0000 (20:16 +0200)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 17 Jan 2025 08:40:00 +0000 (10:40 +0200)
src/lib-settings/test-settings-parser.c

index ce8936185472332adddcfc0b6259bf3de9a6249e..2be78b9727b250f7d6a37e949026a2635335270b 100644 (file)
@@ -80,16 +80,16 @@ static void test_settings_parser(void)
                SETTING_DEFINE_STRUCT_UINTMAX("uintmax_max", uintmax_max, struct test_settings),
                SETTING_DEFINE_STRUCT_UINT("uint", uint, struct test_settings),
                { .type = SET_UINT_OCT, .key = "uint_oct",
-                 offsetof(struct test_settings, uint_oct), NULL },
+                 .offset = offsetof(struct test_settings, uint_oct) },
                SETTING_DEFINE_STRUCT_TIME("secs", secs, struct test_settings),
                SETTING_DEFINE_STRUCT_TIME_MSECS("msecs", msecs, struct test_settings),
                SETTING_DEFINE_STRUCT_SIZE("size", size, struct test_settings),
                SETTING_DEFINE_STRUCT_IN_PORT("port", port, struct test_settings),
                SETTING_DEFINE_STRUCT_STR_NOVARS("str", str, struct test_settings),
                { .type = SET_STR, .key = "expand_str",
-                 offsetof(struct test_settings, expand_str), NULL },
+                 .offset = offsetof(struct test_settings, expand_str) },
                { .type = SET_STRLIST, .key = "strlist",
-                 offsetof(struct test_settings, strlist), NULL },
+                 .offset = offsetof(struct test_settings, strlist) },
                SETTING_DEFINE_LIST_END
        };
        const struct setting_parser_info root = {