]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/fstab-generator/fstab-generator.c
Replace strdup_or_null() by strdup_to()
[thirdparty/systemd.git] / src / fstab-generator / fstab-generator.c
index e4c8c9674c044e26d00c127adb99ab4ee51afabe..b4df9d23c2a4a003174432fe89f2d8297f42a1d0 100644 (file)
@@ -498,13 +498,8 @@ static int mandatory_mount_drop_unapplicable_options(
         assert(where);
         assert(ret_options);
 
-        if (!(*flags & (MOUNT_NOAUTO|MOUNT_NOFAIL|MOUNT_AUTOMOUNT))) {
-                r = strdup_or_null(options, ret_options);
-                if (r < 0)
-                        return r;
-
-                return 0;
-        }
+        if (!(*flags & (MOUNT_NOAUTO|MOUNT_NOFAIL|MOUNT_AUTOMOUNT)))
+                return strdup_to(ret_options, options);
 
         log_debug("Mount '%s' is mandatory, ignoring 'noauto', 'nofail', and 'x-systemd.automount' options.",
                   where);