From: Aki Tuomi Date: Fri, 25 Jul 2025 08:48:43 +0000 (+0300) Subject: auth: auth-cache - Deduplicate auth_cache_parse_key() to use auth_cache_parse_key_and... X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=759ee1af848480987d012de2f7135160156724b6;p=thirdparty%2Fdovecot%2Fcore.git auth: auth-cache - Deduplicate auth_cache_parse_key() to use auth_cache_parse_key_and_fields() Simplifies following commit --- diff --git a/src/auth/auth-cache.c b/src/auth/auth-cache.c index 3ccd45ff4b..ad8cbe5078 100644 --- a/src/auth/auth-cache.c +++ b/src/auth/auth-cache.c @@ -122,14 +122,14 @@ static char *auth_cache_parse_key_exclude(pool_t pool, const char *query, char *auth_cache_parse_key(pool_t pool, const char *query) { - return auth_cache_parse_key_exclude(pool, query, NULL); + return auth_cache_parse_key_and_fields(pool, query, NULL, NULL); } char *auth_cache_parse_key_and_fields(pool_t pool, const char *query, const ARRAY_TYPE(const_string) *fields, const char *exclude_driver) { - if (!array_is_empty(fields)) { + if (fields != NULL && !array_is_empty(fields)) { unsigned int i, count; const char *const *str = array_get(fields, &count); string_t *full_query = t_str_new(128);