From 525a0ab2f54208bc680b5629bfcd27debb03a986 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 23 Oct 2017 13:19:59 +0200 Subject: unshare: cleanup if-if code Signed-off-by: Karel Zak --- sys-utils/unshare.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sys-utils/unshare.c') 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) -- cgit v1.2.3-55-g7522