From: Karel Zak Date: Mon, 23 Oct 2017 11:19:59 +0000 (+0200) Subject: unshare: cleanup if-if code X-Git-Tag: v2.32-rc1~251 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=525a0ab2f54208bc680b5629bfcd27debb03a986;p=thirdparty%2Futil-linux.git unshare: cleanup if-if code Signed-off-by: Karel Zak --- diff --git a/sys-utils/unshare.c b/sys-utils/unshare.c index 00afc7dd8a..f26b148f70 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)