]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mount: simplify de-serialization of control PID a bit
authorLennart Poettering <lennart@poettering.net>
Wed, 28 Nov 2018 11:41:14 +0000 (12:41 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 7 Dec 2018 16:30:14 +0000 (17:30 +0100)
src/core/mount.c

index 9b81b6be2073b4a17bc0aff504fcc4f438492bf2..f5aa90e3df9b6f372d4c1edc9700b62605fb74d4 100644 (file)
@@ -1210,12 +1210,10 @@ static int mount_deserialize_item(Unit *u, const char *key, const char *value, F
                         log_unit_debug(u, "Failed to parse n-retry-umount value: %s", value);
 
         } else if (streq(key, "control-pid")) {
-                pid_t pid;
 
-                if (parse_pid(value, &pid) < 0)
+                if (parse_pid(value, &m->control_pid) < 0)
                         log_unit_debug(u, "Failed to parse control-pid value: %s", value);
-                else
-                        m->control_pid = pid;
+
         } else if (streq(key, "control-command")) {
                 MountExecCommand id;