]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/btrfs.c: btrfs_is_subvolume(): Simplify error check
authorAlejandro Colomar <alx@kernel.org>
Wed, 22 Apr 2026 09:02:36 +0000 (11:02 +0200)
committerAlejandro Colomar <foss+github@alejandro-colomar.es>
Thu, 23 Apr 2026 12:17:18 +0000 (14:17 +0200)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/btrfs.c

index 85ec7dbc489ed9ba3d2896b009d1b96f525b0040..fe20cf306acf9987349c383996cbdb65754c4a39 100644 (file)
@@ -67,8 +67,7 @@ int btrfs_is_subvolume(const char *path)
        if (ret <= 0)
                return ret;
 
-       ret = stat(path, &st);
-       if (ret == -1)
+       if (stat(path, &st) == -1)
                return -1;
 
        if (st.st_ino != BTRFS_FIRST_FREE_OBJECTID || !S_ISDIR(st.st_mode)) {