diff options
Diffstat (limited to 'usr.bin/uname/uname.c')
-rw-r--r-- | usr.bin/uname/uname.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/usr.bin/uname/uname.c b/usr.bin/uname/uname.c index d15c7c7fe2f..5f219d17d94 100644 --- a/usr.bin/uname/uname.c +++ b/usr.bin/uname/uname.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uname.c,v 1.18 2016/10/10 02:23:54 gsoares Exp $ */ +/* $OpenBSD: uname.c,v 1.19 2016/10/28 07:22:59 schwarze Exp $ */ /* * Copyright (c) 1994 Winning Strategies, Inc. @@ -35,12 +35,11 @@ #include <sys/utsname.h> #include <err.h> -#include <locale.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> -static void usage(void); +static void __dead usage(void); #define PRINT_SYSNAME 0x01 #define PRINT_NODENAME 0x02 @@ -58,8 +57,6 @@ main(int argc, char *argv[]) int space = 0; int print_mask = 0; - setlocale(LC_ALL, ""); - if (pledge("stdio", NULL) == -1) err(1, "pledge"); @@ -88,18 +85,14 @@ main(int argc, char *argv[]) break; default: usage(); - /* NOTREACHED */ } } - if (optind != argc) { + if (optind != argc) usage(); - /* NOTREACHED */ - } - if (!print_mask) { + if (!print_mask) print_mask = PRINT_SYSNAME; - } if (uname(&u) == -1) err(1, NULL); @@ -143,7 +136,7 @@ main(int argc, char *argv[]) return 0; } -static void +static void __dead usage(void) { fprintf(stderr, "usage: uname [-amnprsv]\n"); |