From: Timo Sirainen Date: Wed, 4 Jan 2023 20:22:43 +0000 (+0200) Subject: lib-settings: Remove unused settings_parser_get() X-Git-Tag: 2.4.0~2354 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4e0ebdafef6678920470d21c1f96f5d91baf772;p=thirdparty%2Fdovecot%2Fcore.git lib-settings: Remove unused settings_parser_get() --- diff --git a/src/lib-settings/settings-parser.c b/src/lib-settings/settings-parser.c index 04b609304f..cfb0f57145 100644 --- a/src/lib-settings/settings-parser.c +++ b/src/lib-settings/settings-parser.c @@ -256,13 +256,6 @@ void settings_parser_unref(struct setting_parser_context **_ctx) pool_unref(&ctx->parser_pool); } -void *settings_parser_get(struct setting_parser_context *ctx) -{ - i_assert(ctx->root_count == 1); - - return ctx->roots[0].set_struct; -} - void *settings_parser_get_root_set(const struct setting_parser_context *ctx, const struct setting_parser_info *root) { diff --git a/src/lib-settings/settings-parser.h b/src/lib-settings/settings-parser.h index 234f22f8d1..a74348a7ca 100644 --- a/src/lib-settings/settings-parser.h +++ b/src/lib-settings/settings-parser.h @@ -132,8 +132,6 @@ settings_parser_init_list(pool_t set_pool, void settings_parser_ref(struct setting_parser_context *ctx); void settings_parser_unref(struct setting_parser_context **ctx); -/* Return pointer to root setting structure. */ -void *settings_parser_get(struct setting_parser_context *ctx); /* Returns settings for a specific root. The root is expected to exist, and it must be the same pointer as given to settings_parser_init*(). If it doesn't, the function panics. */ @@ -143,7 +141,7 @@ void *settings_parser_get_root_set(const struct setting_parser_context *ctx, void *settings_parser_get_root_set_dup(const struct setting_parser_context *ctx, const struct setting_parser_info *root, pool_t pool); -/* Like settings_parser_get(), but return change struct. */ +/* Return pointer to changes in the root setting structure. */ void *settings_parser_get_changes(struct setting_parser_context *ctx); /* Returns the setting parser's roots (same as given to init()). */ const struct setting_parser_info *const *