]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
fstab-util: drop redundant check
authorLennart Poettering <lennart@poettering.net>
Thu, 1 Jun 2023 12:48:55 +0000 (14:48 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 1 Jun 2023 15:17:42 +0000 (17:17 +0200)
fstab_test_option() checks this as first thing anyway, hence let's drop
the redundant check.

src/shared/fstab-util.c

index 164e71a150d0d9f1d2c139168987093a233714f9..d22cff2d82367353047b5e56bcfdc0644a1d159d 100644 (file)
@@ -54,7 +54,7 @@ bool fstab_is_extrinsic(const char *mount, const char *opts) {
 
         /* If this is an initrd mount, and we are not in the initrd, then leave
          * this around forever, too. */
-        if (opts && fstab_test_option(opts, "x-initrd.mount\0") && !in_initrd())
+        if (fstab_test_option(opts, "x-initrd.mount\0") && !in_initrd())
                 return true;
 
         return false;