]> git.ipfire.org Git - pakfire.git/commitdiff
path: Make the static analyzer happy again
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 14 Dec 2024 15:44:45 +0000 (15:44 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 14 Dec 2024 15:44:54 +0000 (15:44 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/path.c

index 955ca41fa851d526be3f8742d27e392ed366bd35..80bd7180886dcc9fd267e2f387c8142327123b9b 100644 (file)
@@ -517,6 +517,10 @@ int pakfire_path_is_absolute(const char* s) {
        if (r < 0)
                return r;
 
+       // Make the static analyzer happy
+       if (!path)
+               return -EINVAL;
+
        // Is this absolute?
        r = path->is_absolute;