unit: drop an unused assignment

Resolves: CID#1509244
This commit is contained in:
Frantisek Sumsal 2023-07-02 11:22:50 +02:00
parent 9cf7f7a82f
commit 85773a7fd0

View 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 */