]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mount: remove unnecessary initialization of device_wants_mount and 'if'
authorLennart Poettering <lennart@poettering.net>
Wed, 28 Nov 2018 11:33:45 +0000 (12:33 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 7 Dec 2018 16:30:14 +0000 (17:30 +0100)
src/core/mount.c

index ab22777c894a8bfe03ddfb42da9c2346e48b8486..134349d6f995b569b342d9ce06bd9d7bc51bad72 100644 (file)
@@ -312,7 +312,7 @@ static int mount_add_mount_dependencies(Mount *m) {
 }
 
 static int mount_add_device_dependencies(Mount *m) {
-        bool device_wants_mount = false;
+        bool device_wants_mount;
         UnitDependencyMask mask;
         MountParameters *p;
         UnitDependency dep;
@@ -342,8 +342,8 @@ static int mount_add_device_dependencies(Mount *m) {
         if (path_equal(m->where, "/"))
                 return 0;
 
-        if (mount_is_auto(p) && !mount_is_automount(p) && MANAGER_IS_SYSTEM(UNIT(m)->manager))
-                device_wants_mount = true;
+        device_wants_mount =
+                mount_is_auto(p) && !mount_is_automount(p) && MANAGER_IS_SYSTEM(UNIT(m)->manager);
 
         /* Mount units from /proc/self/mountinfo are not bound to devices
          * by default since they're subject to races when devices are