]> git.ipfire.org Git - pakfire.git/commitdiff
pakfire: Clang does not seem to like if we are checking for NULL
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 11 Jan 2025 17:56:20 +0000 (17:56 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 11 Jan 2025 17:56:20 +0000 (17:56 +0000)
The function is delcared with nonnull(), and therefore Clang complains
that we are actually checking this again. Probably fair.

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

index 7b30b6ffa9746027d3ed4c787c18e476b39600d1..1f77028765c586ae1744acd55a449413b7cd7b9e 100644 (file)
@@ -1068,7 +1068,7 @@ const char* pakfire_get_path(struct pakfire* pakfire) {
 
 int pakfire_openat(struct pakfire* pakfire, const char* path, int flags) {
        // Make paths relative
-       while (path && *path == '/')
+       while (*path == '/')
                path++;
 
        return openat(pakfire->fd, path, flags);