diff --git a/src/core/unit.c b/src/core/unit.c index 81467093e7..86c636840f 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -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 */