From 7dfee8efa743c7dffc3803109a143a4d6333556f Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sat, 24 May 2014 12:51:53 -0500 Subject: Remove debug detritus I didn't mean to to check in, and treat an "this variable can never actually be used uninitialized but gcc's warning generator can't tell and fails spamwards" warning. --- toys/posix/date.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'toys/posix/date.c') diff --git a/toys/posix/date.c b/toys/posix/date.c index f56c4804..15aafb0b 100644 --- a/toys/posix/date.c +++ b/toys/posix/date.c @@ -95,13 +95,13 @@ int parse_posixdate(char *str, struct tm *tm) void date_main(void) { char *setdate = *toys.optargs, *format_string = "%a %b %e %H:%M:%S %Z %Y", - *tz; + *tz = 0; time_t now = time(NULL); struct tm tm; // We can't just pass a timezone to mktime because posix. if (toys.optflags & FLAG_u) { - tz = CFG_TOYBOX_FREE ? getenv("TZ") : 0; + if (CFG_TOYBOX_FREE) tz = getenv("TZ"); setenv("TZ", "UTC", 1); tzset(); } @@ -114,7 +114,6 @@ void date_main(void) } else if (TT.showdate) { setdate = TT.showdate; if (TT.setfmt) { -printf("TT.showdate=%s TT.setfmt=%s\n", TT.showdate, TT.setfmt); char *s = strptime(TT.showdate, TT.setfmt+(*TT.setfmt=='+'), &tm); if (!s || *s) goto bad_date; -- cgit v1.2.3