From 30b13721567d54c1c411270bb669fe2a603bc56b Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Fri, 3 Jan 2025 09:30:42 +0000 Subject: [PATCH] strings: Help the compiler to understand what array we mean Signed-off-by: Michael Tremer --- src/pakfire/string.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pakfire/string.h b/src/pakfire/string.h index bdc5d06c0..47c2f373e 100644 --- a/src/pakfire/string.h +++ b/src/pakfire/string.h @@ -120,12 +120,12 @@ inline int pakfire_strings_append(char*** array, const char* s) { return -errno; // Copy the string - char* p = *array[length++] = strdup(s); + char* p = (*array)[length++] = strdup(s); if (!p) return -errno; // Terminate the array - *array[length] = NULL; + (*array)[length] = NULL; // Return the total length of the array return length; -- 2.47.3