]> git.ipfire.org Git - pakfire.git/commitdiff
string: Don't return the number of elements in an array after append
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 29 Jan 2025 17:11:08 +0000 (17:11 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 29 Jan 2025 17:11:08 +0000 (17:11 +0000)
We don't use this anywhere and it requires to reset r whenever we store
the value in it.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/string.c

index 83bd6c22cde6f0067f3c3e2f6a59b60057526cb1..6ebec1c7c989926cade4927772adde52245dd48d 100644 (file)
@@ -500,7 +500,7 @@ int pakfire_strings_append(char*** array, const char* s) {
        (*array)[length] = NULL;
 
        // Return the total length of the array
-       return length;
+       return 0;
 
 ERROR:
        if (p)