diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2015-09-23 22:01:31 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2015-09-23 22:01:31 +0000 |
commit | cf54d70f68527f2f8cc3e40afdb2e8a4ce696911 (patch) | |
tree | fe28d4616c099a201ef25e8d012fdbab1d1d4816 /usr.bin/arch | |
parent | c83ef448a633dc8d4b7cf592748feea5c350380e (diff) |
No need for err.h, avoid excess fputs() calls and return from main
instead of calling exit(). From Michael Reed.
Diffstat (limited to 'usr.bin/arch')
-rw-r--r-- | usr.bin/arch/arch.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/usr.bin/arch/arch.c b/usr.bin/arch/arch.c index 99d890c4a32..d4e90eb85d5 100644 --- a/usr.bin/arch/arch.c +++ b/usr.bin/arch/arch.c @@ -25,7 +25,6 @@ #include <sys/param.h> /* MACHINE MACHINE_ARCH */ -#include <err.h> #include <locale.h> #include <stdio.h> #include <stdlib.h> @@ -73,13 +72,10 @@ main(int argc, char *argv[]) usage(); /* NOTREACHED */ } - if (!short_form) { - fputs("OpenBSD", stdout); - fputc('.', stdout); - } - fputs(arch, stdout); - fputc('\n', stdout); - exit(0); + if (!short_form) + fputs("OpenBSD.", stdout); + puts(arch); + return 0; } static void |