]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: Make p_array_const_string_join() returning "" for not created arrays.
authorsergey.kitov <sergey.kitov@open-xchange.com>
Thu, 5 Oct 2023 12:44:56 +0000 (15:44 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 12 Feb 2025 10:34:13 +0000 (12:34 +0200)
src/lib/strfuncs.c

index 4d7a439c2ce760526b7567f22b6372f5dfbc0765..93e14abfa04d96bda94c082de0f5e5ab9fa23087 100644 (file)
@@ -987,7 +987,7 @@ char *dec2str_buf(char buffer[STATIC_ARRAY MAX_INT_STRLEN], uintmax_t number)
 char *p_array_const_string_join(pool_t pool, const ARRAY_TYPE(const_string) *arr,
                                const char *separator)
 {
-       if (array_count(arr) == 0)
+       if (array_is_empty(arr))
                return "";
        return p_strarray_join_n(pool, array_front(arr), array_count(arr),
                                 separator);