diff options
author | lum <lum@cvs.openbsd.org> | 2011-04-29 05:45:12 +0000 |
---|---|---|
committer | lum <lum@cvs.openbsd.org> | 2011-04-29 05:45:12 +0000 |
commit | 863e676b0b520643be3cf2be619d9b8c38210bd8 (patch) | |
tree | 2224fe6ee67a2840c952b820f464b6706950e789 /usr.bin/apply | |
parent | 105ae1e19890ffc006c51468c5d7b13f96fd20a9 (diff) |
small tidy. contribution from patrick keshishian and extra tab spot by halex. Thanks.
ok nicm@
Diffstat (limited to 'usr.bin/apply')
-rw-r--r-- | usr.bin/apply/apply.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/usr.bin/apply/apply.c b/usr.bin/apply/apply.c index bfb5e34270c..15a9d9f87c9 100644 --- a/usr.bin/apply/apply.c +++ b/usr.bin/apply/apply.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apply.c,v 1.24 2009/10/27 23:59:35 deraadt Exp $ */ +/* $OpenBSD: apply.c,v 1.25 2011/04/29 05:45:11 lum Exp $ */ /* $NetBSD: apply.c,v 1.3 1995/03/25 03:38:23 glass Exp $ */ /*- @@ -44,8 +44,8 @@ #include <string.h> #include <unistd.h> -void usage(void); -int mysystem(const char *); +__dead void usage(void); +static int mysystem(const char *); int main(int argc, char *argv[]) @@ -179,9 +179,8 @@ main(int argc, char *argv[]) /* Run the command. */ if (debug) (void)printf("%s\n", c); - else - if (mysystem(c)) - rval = 1; + else if (mysystem(c)) + rval = 1; } if (argc != 1) @@ -191,14 +190,14 @@ main(int argc, char *argv[]) } /* - * system -- + * mysystem -- * Private version of system(3). Use the user's SHELL environment * variable as the shell to execute. */ -int +static int mysystem(const char *command) { - static char *name, *shell; + static const char *name, *shell; pid_t pid; int pstat; sigset_t mask, omask; @@ -235,7 +234,7 @@ mysystem(const char *command) return(pid == -1 ? -1 : pstat); } -void +__dead void usage(void) { (void)fprintf(stderr, |