]> git.ipfire.org Git - pakfire.git/commitdiff
arch: Fix making build target lowercase
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 21 Nov 2022 10:47:06 +0000 (10:47 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 21 Nov 2022 10:47:06 +0000 (10:47 +0000)
The format function used to return the length of the string, but that
got changed some time ago.

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

index 161a41c52c1f00185c5b9530ac13bbac21106c90..eabf953c622e169fe04e0c7469f463553eb20ca8 100644 (file)
@@ -205,8 +205,8 @@ int __pakfire_arch_buildtarget(char* buffer, size_t length, const char* arch, co
                return r;
 
        // Make everything lowercase
-       for (unsigned int i = 0; i <= (unsigned int)r; i++)
-               buffer[i] = tolower(buffer[i]);
+       for (char* p = buffer; *p; p++)
+               *p = tolower(*p);
 
        return 0;
 }