commit bash-20120921 snapshot

This commit is contained in:
Chet Ramey
2012-10-10 09:37:30 -04:00
parent f14388d3aa
commit 47b599dc52
23 changed files with 4829 additions and 53 deletions
+6 -1
View File
@@ -472,7 +472,12 @@ printf_builtin (list)
sv_tz ("TZ"); /* XXX -- just make sure */
#endif
tm = localtime (&secs);
n = strftime (timebuf, sizeof (timebuf), timefmt, tm);
if (tm == 0)
{
secs = 0;
tm = localtime (&secs);
}
n = tm ? strftime (timebuf, sizeof (timebuf), timefmt, tm) : 0;
free (timefmt);
if (n == 0)
timebuf[0] = '\0';