]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
unit: drop an unused assignment
authorFrantisek Sumsal <frantisek@sumsal.cz>
Sun, 2 Jul 2023 09:22:50 +0000 (11:22 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Sun, 2 Jul 2023 10:22:45 +0000 (12:22 +0200)
Resolves: CID#1509244

src/core/unit.c

index 81467093e75611fd29869f0d2786545e96248555..86c636840f8ae5f5935324e7c12a9b6d8c5f7745 100644 (file)
@@ -2876,9 +2876,7 @@ int unit_watch_pid(Unit *u, pid_t pid, bool exclusive) {
                                 if (array[n] == u)
                                         found = true;
 
-                if (found) /* Found it already? if so, do nothing */
-                        r = 0;
-                else {
+                if (!found) {
                         Unit **new_array;
 
                         /* Allocate a new array */