summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJob Snijders <job@cvs.openbsd.org>2021-09-01 19:54:35 +0000
committerJob Snijders <job@cvs.openbsd.org>2021-09-01 19:54:35 +0000
commit7e24e5d80dd8810770cf1fb9069a414c66cd20a6 (patch)
treed9df4fa40824a8e49267e58b29b0698436672f7a
parent8d3f724f2d1e7155cf54fb2be9c9d2dd2f3085a2 (diff)
Style nits
Contribution from Anton Lindqvist
-rw-r--r--usr.bin/timeout/timeout.c12
1 files 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)