aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2017-05-19 19:04:30 +0200
committerDuncaen <mail@duncano.de>2017-05-19 19:04:30 +0200
commit3ebfe629b6192a641321e4ae951835578d8d3ce8 (patch)
tree2eb80053ae44ced7b24f6aac5730a2c681c81486
parent0b5d491d27604eb65cc92f64c1169bad9a0761e1 (diff)
downloadlobase-3ebfe629b6192a641321e4ae951835578d8d3ce8.tar.gz
usr.bin/basename: update to OPENBSD_6_1
-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 21f63b0..f2d8c82 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)
{