summaryrefslogtreecommitdiff
path: root/bin/chmod
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2016-10-19 18:20:27 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2016-10-19 18:20:27 +0000
commit7aba8e9b446901982da24c12cf28023db2701b30 (patch)
treee7e10c0cd71cbab7399325a0144aaaf3f1eb0807 /bin/chmod
parent9a23494aa0d3aabacfd327dd2ccd3f4e5a015c96 (diff)
Delete useless setlocale(3) in src/bin/.
Minor cleanup while here: return from main, static void __dead usage, etc. Based on a patch from Jan Stary <hans at stare dot cz>. Feedback and OK tb@, OK millert@.
Diffstat (limited to 'bin/chmod')
-rw-r--r--bin/chmod/chmod.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/bin/chmod/chmod.c b/bin/chmod/chmod.c
index 8d8e03275ee..2ed31346ed9 100644
--- a/bin/chmod/chmod.c
+++ b/bin/chmod/chmod.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: chmod.c,v 1.39 2015/12/31 23:38:16 guenther Exp $ */
+/* $OpenBSD: chmod.c,v 1.40 2016/10/19 18:20:25 schwarze Exp $ */
/* $NetBSD: chmod.c,v 1.12 1995/03/21 09:02:09 cgd Exp $ */
/*
@@ -39,7 +39,6 @@
#include <fts.h>
#include <grp.h>
#include <limits.h>
-#include <locale.h>
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
@@ -51,7 +50,7 @@ extern char *__progname;
gid_t a_gid(const char *);
uid_t a_uid(const char *, int);
-__dead void usage(void);
+static void __dead usage(void);
int
main(int argc, char *argv[])
@@ -68,8 +67,6 @@ main(int argc, char *argv[])
u_int32_t fclear, fset;
char *ep, *mode, *cp, *flags;
- setlocale(LC_ALL, "");
-
if (strlen(__progname) > 2) {
ischown = __progname[2] == 'o';
ischgrp = __progname[2] == 'g';
@@ -281,7 +278,7 @@ done:
if (errno)
err(1, "fts_read");
fts_close(ftsp);
- exit(rval);
+ return (rval);
}
/*
@@ -341,7 +338,7 @@ a_gid(const char *s)
return (gid);
}
-void
+static void __dead
usage(void)
{
fprintf(stderr,