Date: Tue, 7 Oct 2014 06:02:09 +0000 (UTC) From: "Andrey A. Chernov" <ache@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272678 - head/lib/libc/stdtime Message-ID: <201410070602.s97629cO069972@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ache Date: Tue Oct 7 06:02:08 2014 New Revision: 272678 URL: https://svnweb.freebsd.org/changeset/base/272678 Log: 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. Modified: head/lib/libc/stdtime/strptime.c Modified: head/lib/libc/stdtime/strptime.c ============================================================================== --- head/lib/libc/stdtime/strptime.c Tue Oct 7 06:00:32 2014 (r272677) +++ head/lib/libc/stdtime/strptime.c Tue Oct 7 06:02:08 2014 (r272678) @@ -676,8 +676,6 @@ strptime_l(const char * __restrict buf, if (ret && gmt) { time_t t = timegm(tm); - if (t == -1) - return (NULL); localtime_r(&t, tm); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410070602.s97629cO069972>