]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
dissect-image: simplification
authorLennart Poettering <lennart@poettering.net>
Sat, 20 Sep 2025 06:40:25 +0000 (08:40 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 22 Sep 2025 05:38:31 +0000 (14:38 +0900)
src/shared/dissect-image.c

index bd648d84b0590d9255f22f63faff841330c5654a..0c632296a76c9a6106e91154319b36f5497da592 100644 (file)
@@ -81,11 +81,9 @@ static int allowed_fstypes(char ***ret_strv) {
         assert(ret_strv);
 
         e = secure_getenv("SYSTEMD_DISSECT_FILE_SYSTEMS");
-        if (e) {
+        if (e)
                 l = strv_split(e, ":");
-                if (!l)
-                        return -ENOMEM;
-        } else {
+        else
                 l = strv_new("btrfs",
                              "erofs",
                              "ext4",
@@ -93,12 +91,10 @@ static int allowed_fstypes(char ***ret_strv) {
                              "squashfs",
                              "vfat",
                              "xfs");
-                if (!l)
-                        return -ENOMEM;
-        }
+        if (!l)
+                return -ENOMEM;
 
         *ret_strv = TAKE_PTR(l);
-
         return 0;
 }