]> git.ipfire.org Git - pakfire.git/commitdiff
strings: Help the compiler to understand what array we mean
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 3 Jan 2025 09:30:42 +0000 (09:30 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 3 Jan 2025 09:30:42 +0000 (09:30 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/string.h

index bdc5d06c0b9684fdb5ab92b9dda06c1b8321ecc1..47c2f373ee166d8809d39d8e1b7ab18b328bfd56 100644 (file)
@@ -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;