handle errors from localtime_r in ctime_r
authorRich Felker <dalias@aerifal.cx>
Wed, 21 Jun 2017 00:31:35 +0000 (20:31 -0400)
committerRich Felker <dalias@aerifal.cx>
Wed, 21 Jun 2017 00:31:35 +0000 (20:31 -0400)
commit64f855874c32e192382df69f4765a7e32057a005
tree06a2b8930057e9a0e52aaefa06fcd9a1dc417dc6
parent2d7d05f031e014068a61d3076c6178513395d2ae
handle errors from localtime_r in ctime_r

POSIX requires ctime_r return a null pointer on failure, which can
occur if the input time_t value is not representable in broken down
form.

based on patch by Alexander Monakov.
src/time/ctime_r.c