From: Timo Sirainen Date: Fri, 26 Jan 2024 15:00:19 +0000 (+0200) Subject: config: Hide the trailing NULL in config_parser_context.all_filter_parsers X-Git-Tag: 2.4.1~1139 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e03d130cb26b7c8d2a0b1d1f61bdbfa9db64623;p=thirdparty%2Fdovecot%2Fcore.git config: Hide the trailing NULL in config_parser_context.all_filter_parsers Needed by the following changes. --- diff --git a/src/config/config-parser.c b/src/config/config-parser.c index 677b371855..e5d701d284 100644 --- a/src/config/config-parser.c +++ b/src/config/config-parser.c @@ -1258,8 +1258,7 @@ config_all_parsers_check(struct config_parser_context *ctx, } parsers = array_get(&ctx->all_filter_parsers, &count); - i_assert(count > 0 && parsers[count-1] == NULL); - count--; + i_assert(parsers[count] == NULL); struct event *event = event_create(NULL); event_set_ptr(event, SETTINGS_EVENT_ROOT, set_root); @@ -1670,6 +1669,7 @@ config_parse_finish(struct config_parser_context *ctx, config_drop_overridden_default_settings(ctx); array_append_zero(&ctx->all_filter_parsers); + array_pop_back(&ctx->all_filter_parsers); new_config->filter_parsers = array_front(&ctx->all_filter_parsers); new_config->module_parsers = ctx->root_module_parsers;