]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
config: Use setting_parser_info_get_define_count()
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 30 May 2023 15:15:49 +0000 (18:15 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 12 Feb 2025 10:34:08 +0000 (12:34 +0200)
src/config/config-dump-full.c

index 4fc17271b0727c515dd0b80560e94acb261bad11..5dcae13109fb86314d2a007f193459ad36c80d5d 100644 (file)
@@ -180,9 +180,8 @@ static void
 config_dump_full_write_keys(struct ostream *output,
                            const struct setting_parser_info *info)
 {
-       unsigned int count;
+       unsigned int count = setting_parser_info_get_define_count(info);
 
-       for (count = 0; info->defines[count].key != NULL; count++) ;
        uint32_t count_be32 = cpu32_to_be(count);
        o_stream_nsend(output, &count_be32, sizeof(count_be32));