From 9abe983c4ee9cc266ba2fa174a4cc6d9cfbd53b6 Mon Sep 17 00:00:00 2001 From: job Date: Wed, 1 Sep 2021 19:54:34 +0000 Subject: [PATCH] Style nits Contribution from Anton Lindqvist --- usr.bin/timeout/timeout.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/usr.bin/timeout/timeout.c b/usr.bin/timeout/timeout.c index f1f072a7aa4..9cb0ea0b01d 100644 --- a/usr.bin/timeout/timeout.c +++ b/usr.bin/timeout/timeout.c @@ -136,7 +136,7 @@ sig_handler(int signo) return; } - switch(signo) { + switch (signo) { case SIGINT: case SIGHUP: case SIGQUIT: @@ -228,7 +228,7 @@ main(int argc, char **argv) argv++; if (!foreground) { - pgid = setpgid(0,0); + pgid = setpgid(0, 0); if (pgid == -1) err(1, "setpgid()"); @@ -240,13 +240,13 @@ main(int argc, char **argv) if (killsig != SIGKILL && killsig != SIGSTOP) signums[0] = killsig; - for (i = 0; i < sizeof(signums) / sizeof(signums[0]); i ++) + for (i = 0; i < sizeof(signums) / sizeof(signums[0]); i++) sigaddset(&signals.sa_mask, signums[i]); signals.sa_handler = sig_handler; signals.sa_flags = SA_RESTART; - for (i = 0; i < sizeof(signums) / sizeof(signums[0]); i ++) { + for (i = 0; i < sizeof(signums) / sizeof(signums[0]); i++) { if (signums[i] != -1 && signums[i] != 0 && sigaction(signums[i], &signals, NULL) == -1) err(1, "sigaction()"); @@ -323,14 +323,14 @@ main(int argc, char **argv) } } - while (cpid != pid && wait(&pstat) == -1) { + while (cpid != pid && wait(&pstat) == -1) { if (errno != EINTR) err(1, "waitpid()"); } if (WEXITSTATUS(pstat)) pstat = WEXITSTATUS(pstat); - else if(WIFSIGNALED(pstat)) + else if (WIFSIGNALED(pstat)) pstat = 128 + WTERMSIG(pstat); if (timedout && !preserve) -- 2.20.1