]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
unshare: cleanup if-if code
authorKarel Zak <kzak@redhat.com>
Mon, 23 Oct 2017 11:19:59 +0000 (13:19 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 23 Oct 2017 11:19:59 +0000 (13:19 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/unshare.c

index 00afc7dd8ae6d1b1862843929124ebc1f190c32c..f26b148f708870ef09c73fca9526844fa00afc88 100644 (file)
@@ -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)