aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2017-05-19 18:58:19 +0200
committerDuncaen <mail@duncano.de>2017-05-19 18:58:19 +0200
commit88ae87dcf3f8cde80d4698390590599823f9be30 (patch)
treeb96bc6358b53fea9e252103af5d0adf78e07b2c0
parentf9795c402e0bdca65be29ef57016e6c7d97b528e (diff)
downloadlobase-88ae87dcf3f8cde80d4698390590599823f9be30.tar.gz
usr.bin/dirname: update to OPENBSD_6_1
-rw-r--r--usr.bin/dirname/dirname.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/usr.bin/dirname/dirname.c b/usr.bin/dirname/dirname.c
index 7e0328e..01dbea4 100644
--- a/usr.bin/dirname/dirname.c
+++ b/usr.bin/dirname/dirname.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dirname.c,v 1.15 2015/10/09 01:37:07 deraadt Exp $ */
+/* $OpenBSD: dirname.c,v 1.16 2016/10/28 07:22:59 schwarze Exp $ */
/*
* Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -18,12 +18,11 @@
#include <err.h>
#include <libgen.h>
-#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-void usage(void);
+static void __dead usage(void);
int
main(int argc, char *argv[])
@@ -31,8 +30,6 @@ main(int argc, char *argv[])
int ch;
char *dir;
- setlocale(LC_ALL, "");
-
if (pledge("stdio", NULL) == -1)
err(1, "pledge");
@@ -51,12 +48,12 @@ main(int argc, char *argv[])
if ((dir = dirname(argv[0])) == NULL)
err(1, "%s", argv[0]);
puts(dir);
- exit(0);
+ return 0;
}
extern char *__progname;
-void
+static void __dead
usage(void)
{
(void)fprintf(stderr, "usage: %s pathname\n", __progname);