From 7aba8e9b446901982da24c12cf28023db2701b30 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Wed, 19 Oct 2016 18:20:27 +0000 Subject: 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 . Feedback and OK tb@, OK millert@. --- bin/date/date.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'bin/date/date.c') diff --git a/bin/date/date.c b/bin/date/date.c index 96fc97e2509..65d89e0d404 100644 --- a/bin/date/date.c +++ b/bin/date/date.c @@ -1,4 +1,4 @@ -/* $OpenBSD: date.c,v 1.49 2015/10/09 01:37:06 deraadt Exp $ */ +/* $OpenBSD: date.c,v 1.50 2016/10/19 18:20:25 schwarze Exp $ */ /* $NetBSD: date.c,v 1.11 1995/09/07 06:21:05 jtc Exp $ */ /* @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include @@ -53,7 +52,7 @@ int slidetime; static void setthetime(char *); static void badformat(void); -static void usage(void); +static void __dead usage(void); int main(int argc, char *argv[]) @@ -64,8 +63,6 @@ main(int argc, char *argv[]) int ch, rflag; char *format, buf[1024], *outzone = NULL; - setlocale(LC_ALL, ""); - tz.tz_dsttime = tz.tz_minuteswest = 0; rflag = 0; while ((ch = getopt(argc, argv, "ad:jr:ut:z:")) != -1) @@ -146,7 +143,7 @@ main(int argc, char *argv[]) errx(1, "conversion error"); (void)strftime(buf, sizeof(buf), format, tp); (void)printf("%s\n", buf); - exit(0); + return 0; } #define ATOI2(ar) ((ar) += 2, ((ar)[-2] - '0') * 10 + ((ar)[-1] - '0')) @@ -262,7 +259,7 @@ badformat(void) usage(); } -static void +static void __dead usage(void) { (void)fprintf(stderr, -- cgit v1.2.3