summaryrefslogtreecommitdiff
path: root/usr.bin/basename/basename.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/basename/basename.c')
-rw-r--r--usr.bin/basename/basename.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/usr.bin/basename/basename.c b/usr.bin/basename/basename.c
index 21f63b0fbef..f2d8c820ee1 100644
--- a/usr.bin/basename/basename.c
+++ b/usr.bin/basename/basename.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: basename.c,v 1.13 2015/12/24 17:11:47 mmcc Exp $ */
+/* $OpenBSD: basename.c,v 1.14 2016/10/28 07:22:59 schwarze Exp $ */
/* $NetBSD: basename.c,v 1.9 1995/09/02 05:29:46 jtc Exp $ */
/*-
@@ -32,13 +32,12 @@
#include <err.h>
#include <libgen.h>
-#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-void usage(void);
+static void __dead usage(void);
int
main(int argc, char *argv[])
@@ -46,8 +45,6 @@ main(int argc, char *argv[])
int ch;
char *p;
- setlocale(LC_ALL, "");
-
if (pledge("stdio", NULL) == -1)
err(1, "pledge");
@@ -65,7 +62,7 @@ main(int argc, char *argv[])
if (**argv == '\0') {
(void)puts("");
- exit(0);
+ return 0;
}
p = basename(*argv);
if (p == NULL)
@@ -93,7 +90,8 @@ main(int argc, char *argv[])
}
extern char *__progname;
-void
+
+static void __dead
usage(void)
{