diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-11-14 22:40:49 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-11-16 08:04:09 +0100 |
commit | 7c248223ebafb9bfde9af978cd1ccfc57dcced26 (patch) | |
tree | 228bcda6699a2ae88ad01fd1f5f024f2b5d7b0a0 /src/machine | |
parent | ef470ffa234c8c824897488195fb2fc9a4a520e6 (diff) | |
download | systemd-7c248223ebafb9bfde9af978cd1ccfc57dcced26.tar.gz |
tree-wide: use new RET_NERRNO() helper at various places
Diffstat (limited to 'src/machine')
-rw-r--r-- | src/machine/machine.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/machine/machine.c b/src/machine/machine.c index c0ed24b645..a42478e874 100644 --- a/src/machine/machine.c +++ b/src/machine/machine.c @@ -575,14 +575,8 @@ int machine_kill(Machine *m, KillWho who, int signo) { if (!m->unit) return -ESRCH; - if (who == KILL_LEADER) { - /* If we shall simply kill the leader, do so directly */ - - if (kill(m->leader, signo) < 0) - return -errno; - - return 0; - } + if (who == KILL_LEADER) /* If we shall simply kill the leader, do so directly */ + return RET_NERRNO(kill(m->leader, signo)); /* Otherwise, make PID 1 do it for us, for the entire cgroup */ return manager_kill_unit(m->manager, m->unit, signo, NULL); |