From: Frantisek Sumsal Date: Sun, 2 Jul 2023 09:22:50 +0000 (+0200) Subject: unit: drop an unused assignment X-Git-Tag: v254-rc1~53^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=85773a7fd0c4917c0141c49453318200b8d56589;p=thirdparty%2Fsystemd.git unit: drop an unused assignment Resolves: CID#1509244 --- diff --git a/src/core/unit.c b/src/core/unit.c index 81467093e75..86c636840f8 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 */