mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-02 12:20:51 +00:00
strptime: %s format fix.
Almost never needed in real life because %s is tends to be only one format spec. 1) Return code of gmtime_r() is checked. 2) All flags are set. Submitted by: ache MFC after: 3 weeks
This commit is contained in:
parent
8b0569ba8f
commit
eff6f4441a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=272441
@ -503,8 +503,11 @@ _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp,
|
||||
}
|
||||
errno = sverrno;
|
||||
buf = cp;
|
||||
gmtime_r(&t, tm);
|
||||
if (gmtime_r(&t, tm) == NULL)
|
||||
return (NULL);
|
||||
*GMTp = 1;
|
||||
flags |= FLAG_YDAY | FLAG_WDAY | FLAG_MONTH |
|
||||
FLAG_MDAY | FLAG_YEAR;
|
||||
}
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user