lobase

Linux port of OpenBSDs userland.
Log | Files | Refs | README

commit 88ae87dcf3f8cde80d4698390590599823f9be30
parent f9795c402e0bdca65be29ef57016e6c7d97b528e
Author: Duncaen <mail@duncano.de>
Date:   Fri, 19 May 2017 18:58:19 +0200

usr.bin/dirname: update to OPENBSD_6_1

Diffstat:
usr.bin/dirname/dirname.c | 11++++-------
1 file changed, 4 insertions(+), 7 deletions(-)

diff --git 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);