mirror of
https://frontier.innolan.net/rainlance/amiga-tz.git
synced 2026-09-23 14:14:19 +00:00
avoid call of fwrite with size of zero; retype result
SCCS-file: date.c SCCS-SID: 3.6
This commit is contained in:
committed by
Paul Eggert
parent
30eae305f8
commit
6928ce3ab5
@@ -529,10 +529,12 @@ char * format;
|
||||
tm * tmp;
|
||||
{
|
||||
char buf[1024];
|
||||
int result;
|
||||
size_t result;
|
||||
|
||||
if (*format == '\0')
|
||||
return;
|
||||
result = strftime(buf, sizeof buf, format, tmp);
|
||||
if (result == 0 && *format != '\0') {
|
||||
if (result == 0) {
|
||||
(void) fprintf(stderr,
|
||||
"date: error: strftime: result is too long\n");
|
||||
errensure();
|
||||
|
||||
Reference in New Issue
Block a user