From 50787c4f8c38a1296fc8cab4c89d1a5b1a033a21 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 16 Nov 2023 22:38:39 +0200 Subject: [PATCH] lib-settings: Move path_element_count() earlier --- src/lib-settings/settings.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/lib-settings/settings.c b/src/lib-settings/settings.c index 0644153846..f29cf6b8df 100644 --- a/src/lib-settings/settings.c +++ b/src/lib-settings/settings.c @@ -152,6 +152,16 @@ settings_instance_override(struct settings_apply_ctx *ctx, struct event_filter *event_filter, const char **error_r); +static unsigned int path_element_count(const char *key) +{ + unsigned int count = 1; + while ((key = strchr(key, '/')) != NULL) { + key++; + count++; + } + return count; +} + static int settings_block_read_uint32(struct settings_mmap *mmap, size_t *offset, size_t end_offset, @@ -1720,16 +1730,6 @@ settings_get_or_fatal(struct event *event, return set; } -static unsigned int path_element_count(const char *key) -{ - unsigned int count = 1; - while ((key = strchr(key, '/')) != NULL) { - key++; - count++; - } - return count; -} - void settings_override(struct settings_instance *instance, const char *key, const char *value, enum settings_override_type type) -- 2.47.3