diff options
author | Karel Zak | 2017-10-23 13:19:59 +0200 |
---|---|---|
committer | Karel Zak | 2017-10-23 13:19:59 +0200 |
commit | 525a0ab2f54208bc680b5629bfcd27debb03a986 (patch) | |
tree | 807da71fec02ed26b2dd283f7a96d642b43696e1 /sys-utils/unshare.c | |
parent | lib/signames: remove signame array from header file (diff) | |
download | kernel-qcow2-util-linux-525a0ab2f54208bc680b5629bfcd27debb03a986.tar.gz kernel-qcow2-util-linux-525a0ab2f54208bc680b5629bfcd27debb03a986.tar.xz kernel-qcow2-util-linux-525a0ab2f54208bc680b5629bfcd27debb03a986.zip |
unshare: cleanup if-if code
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/unshare.c')
-rw-r--r-- | sys-utils/unshare.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys-utils/unshare.c b/sys-utils/unshare.c index 00afc7dd8..f26b148f7 100644 --- a/sys-utils/unshare.c +++ b/sys-utils/unshare.c @@ -446,9 +446,8 @@ int main(int argc, char *argv[]) } } - if (kill_child_signo != 0) - if (prctl(PR_SET_PDEATHSIG, kill_child_signo) < 0) - err(EXIT_FAILURE, "prctl failed"); + if (kill_child_signo != 0 && prctl(PR_SET_PDEATHSIG, kill_child_signo) < 0) + err(EXIT_FAILURE, "prctl failed"); if (maproot) { if (setgrpcmd == SETGROUPS_ALLOW) |