From 85773a7fd0c4917c0141c49453318200b8d56589 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Sun, 2 Jul 2023 11:22:50 +0200 Subject: [PATCH] unit: drop an unused assignment Resolves: CID#1509244 --- src/core/unit.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 */