From: Tobias Stoeckmann Date: Fri, 3 Apr 2026 07:35:20 +0000 (+0200) Subject: unshare: Fix code indentation X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8d8224a7c28b7fb3fa9dd98b2a39a3710e6bcc4;p=thirdparty%2Futil-linux.git unshare: Fix code indentation Adjust indentation to clarify where these if and else blocks belong. Signed-off-by: Tobias Stoeckmann --- diff --git a/sys-utils/unshare.c b/sys-utils/unshare.c index 9a7c9f617..82bdd65d1 100644 --- a/sys-utils/unshare.c +++ b/sys-utils/unshare.c @@ -1135,18 +1135,18 @@ int main(int argc, char *argv[]) if (sigaction(SIGINT, &sa, NULL) == -1) err(EXIT_FAILURE, _("sigaction SIGINT failed")); - /* Save old mask for child to restore */ - if (sigemptyset(&sigset) != 0 || - sigprocmask(SIG_SETMASK, NULL, &oldsigset) != 0) - err(EXIT_FAILURE, _("sigprocmask failed")); - } else { - /* Block signals to prevent "impatient parent" problem */ - if (sigemptyset(&sigset) != 0 || - sigaddset(&sigset, SIGINT) != 0 || - sigaddset(&sigset, SIGTERM) != 0 || - sigprocmask(SIG_BLOCK, &sigset, &oldsigset) != 0) - err(EXIT_FAILURE, _("sigprocmask block failed")); - } + /* Save old mask for child to restore */ + if (sigemptyset(&sigset) != 0 || + sigprocmask(SIG_SETMASK, NULL, &oldsigset) != 0) + err(EXIT_FAILURE, _("sigprocmask failed")); + } else { + /* Block signals to prevent "impatient parent" problem */ + if (sigemptyset(&sigset) != 0 || + sigaddset(&sigset, SIGINT) != 0 || + sigaddset(&sigset, SIGTERM) != 0 || + sigprocmask(SIG_BLOCK, &sigset, &oldsigset) != 0) + err(EXIT_FAILURE, _("sigprocmask block failed")); + } #ifdef HAVE_PIDFD_OPEN if (kill_child_signo != 0) { /* make a connection to the original process (parent) */