core: get rid of unneeded state variable
No functional change.
This commit is contained in:
parent
82936769a8
commit
c4bee3c40e
|
@ -1705,7 +1705,6 @@ static int manager_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t
|
|||
|
||||
struct cmsghdr *cmsg;
|
||||
struct ucred *ucred = NULL;
|
||||
bool found = false;
|
||||
Unit *u1, *u2, *u3;
|
||||
int r, *fd_array = NULL;
|
||||
unsigned n_fds = 0;
|
||||
|
@ -1773,24 +1772,18 @@ static int manager_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t
|
|||
/* Notify every unit that might be interested, but try
|
||||
* to avoid notifying the same one multiple times. */
|
||||
u1 = manager_get_unit_by_pid_cgroup(m, ucred->pid);
|
||||
if (u1) {
|
||||
if (u1)
|
||||
manager_invoke_notify_message(m, u1, ucred->pid, buf, fds);
|
||||
found = true;
|
||||
}
|
||||
|
||||
u2 = hashmap_get(m->watch_pids1, PID_TO_PTR(ucred->pid));
|
||||
if (u2 && u2 != u1) {
|
||||
if (u2 && u2 != u1)
|
||||
manager_invoke_notify_message(m, u2, ucred->pid, buf, fds);
|
||||
found = true;
|
||||
}
|
||||
|
||||
u3 = hashmap_get(m->watch_pids2, PID_TO_PTR(ucred->pid));
|
||||
if (u3 && u3 != u2 && u3 != u1) {
|
||||
if (u3 && u3 != u2 && u3 != u1)
|
||||
manager_invoke_notify_message(m, u3, ucred->pid, buf, fds);
|
||||
found = true;
|
||||
}
|
||||
|
||||
if (!found)
|
||||
if (!u1 && !u2 && !u3)
|
||||
log_warning("Cannot find unit for notify message of PID "PID_FMT".", ucred->pid);
|
||||
|
||||
if (fdset_size(fds) > 0)
|
||||
|
|
Loading…
Reference in a new issue