Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/date Simplify by using setenv() instead of putenv().
details: https://anonhg.NetBSD.org/src/rev/2c626e1130fb
branches: trunk
changeset: 757917:2c626e1130fb
user: gson <gson%NetBSD.org@localhost>
date: Sun Oct 03 08:21:27 2010 +0000
description:
Simplify by using setenv() instead of putenv().
diffstat:
bin/date/date.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diffs (35 lines):
diff -r 50d2678c4985 -r 2c626e1130fb bin/date/date.c
--- a/bin/date/date.c Sun Oct 03 07:14:33 2010 +0000
+++ b/bin/date/date.c Sun Oct 03 08:21:27 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: date.c,v 1.54 2010/10/02 08:26:09 gson Exp $ */
+/* $NetBSD: date.c,v 1.55 2010/10/03 08:21:27 gson Exp $ */
/*
* Copyright (c) 1985, 1987, 1988, 1993
@@ -40,7 +40,7 @@
#if 0
static char sccsid[] = "@(#)date.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: date.c,v 1.54 2010/10/02 08:26:09 gson Exp $");
+__RCSID("$NetBSD: date.c,v 1.55 2010/10/03 08:21:27 gson Exp $");
#endif
#endif /* not lint */
@@ -79,7 +79,6 @@
size_t bufsiz;
const char *format;
int ch;
- static char tz_utc0[] = "TZ=UTC0";
setprogname(argv[0]);
(void)setlocale(LC_ALL, "");
@@ -107,7 +106,7 @@
tval = strtoll(optarg, NULL, 0);
break;
case 'u': /* do everything in UTC */
- (void)putenv(tz_utc0);
+ (void)setenv("TZ", "UTC0", 1);
break;
default:
usage();
Home |
Main Index |
Thread Index |
Old Index