1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-02 10:01:11 +02:00

users/14897: extra test in strftime builtin for time conversion

This commit is contained in:
Peter Stephenson 2010-02-26 14:24:57 +00:00
parent 07b6256d8e
commit e8c1e2ff4c
2 changed files with 8 additions and 1 deletions

View file

@ -1,5 +1,8 @@
2010-02-26 Peter Stephenson <pws@csr.com>
* users/14897: Src/Modules/datetime.c: test needed on
conversion of time_t to struct tm. Found on 64-bit Linux.
* 27756: Doc/Zsh/calsys.yo, Functions/Calendar/calendar,
Functions/Calendar/calendar_add, Functions/Calendar/calendar_edit,
Functions/Calendar/calendar_sort, Src/Modules/system.c:
@ -12835,5 +12838,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
* $Revision: 1.4917 $
* $Revision: 1.4918 $
*****************************************************

View file

@ -121,6 +121,10 @@ bin_strftime(char *nam, char **argv, Options ops, UNUSED(int func))
}
t = localtime(&secs);
if (!t) {
zwarnnam(nam, "%s: unable to convert to time", argv[1]);
return 1;
}
bufsize = strlen(argv[0]) * 8;
buffer = zalloc(bufsize);