diff options
author | ache <ache@FreeBSD.org> | 2014-10-07 06:02:08 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2014-10-07 06:02:08 +0000 |
commit | 19b981bc1304f22a4e8b3b97f98e6df5fefca782 (patch) | |
tree | e85dc22d44473bd7bc58a2fa92eadd71e1d39436 | |
parent | 7ec118515fb7f893e4b294080d17207ab8351908 (diff) | |
download | FreeBSD-src-19b981bc1304f22a4e8b3b97f98e6df5fefca782.zip FreeBSD-src-19b981bc1304f22a4e8b3b97f98e6df5fefca782.tar.gz |
Back out timegm error check from r272562.
POSIX treats negative time_t as undefined (i.e. may be valid too,
depends on system's policy we don't have) and we don't set EOVERFLOW
in mktime/timegm as POSIX requires to surely distinguish -1 return
as valid negative time from -1 as error return.
-rw-r--r-- | lib/libc/stdtime/strptime.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/libc/stdtime/strptime.c b/lib/libc/stdtime/strptime.c index 55c9960..e942e04 100644 --- a/lib/libc/stdtime/strptime.c +++ b/lib/libc/stdtime/strptime.c @@ -676,8 +676,6 @@ strptime_l(const char * __restrict buf, const char * __restrict fmt, if (ret && gmt) { time_t t = timegm(tm); - if (t == -1) - return (NULL); localtime_r(&t, tm); } |