diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2016-10-28 07:23:00 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2016-10-28 07:23:00 +0000 |
commit | e1eb93081c1a15355b195a51873d6f833e4d6fcc (patch) | |
tree | 0b541d83cf7ca112e060ac73fc158ecf71fccd2d /usr.bin/env/env.c | |
parent | 1b87e303329de4689e89673013329a46d50ee901 (diff) |
Delete some useless setlocale(3) calls in /usr/bin, no functional change.
Patches from Jan Stary <hans at stare dot cz>, tweaked by me and tb@.
While here, apply some simple style improvements:
Sort headers, static void __dead usage(), return from main(),
zap case '?', drop /* NOTREACHED */, drop break after usage(), ...
OK tb@ millert@
Diffstat (limited to 'usr.bin/env/env.c')
-rw-r--r-- | usr.bin/env/env.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/usr.bin/env/env.c b/usr.bin/env/env.c index 87e9a0b8e4b..08aaa75c695 100644 --- a/usr.bin/env/env.c +++ b/usr.bin/env/env.c @@ -1,4 +1,4 @@ -/* $OpenBSD: env.c,v 1.16 2015/10/10 21:19:14 deraadt Exp $ */ +/* $OpenBSD: env.c,v 1.17 2016/10/28 07:22:59 schwarze Exp $ */ /* * Copyright (c) 1988, 1993, 1994 @@ -31,13 +31,12 @@ #include <err.h> #include <errno.h> -#include <locale.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> -__dead void usage(void); +static void __dead usage(void); int main(int argc, char *argv[]) @@ -47,8 +46,6 @@ main(int argc, char *argv[]) char **ep, *p; int ch; - setlocale(LC_ALL, ""); - if (pledge("stdio exec", NULL) == -1) err(1, "pledge"); @@ -86,10 +83,10 @@ main(int argc, char *argv[]) for (ep = environ; *ep; ep++) (void)printf("%s\n", *ep); - exit(0); + return 0; } -void +static void __dead usage(void) { extern char *__progname; |