[PATCH v2 4/7] misc: syslog: Simplify implementation
Paul Eggert
eggert@cs.ucla.edu
Mon Feb 21 22:23:28 GMT 2022
On 2/21/22 06:06, Andreas Schwab wrote:
>> Also, the old code crashed when __localtime_r returns NULL
> How can that happen?
When the resulting tm_year would precede INT_MIN + 1900 or follow
INT_MAX + 1900. Although this shouldn't happen on systems with accurate
clocks for billions of years, syslog should work even when the clock is
outlandishly wrong, to help diagnose clock failures etc.
More information about the Libc-alpha
mailing list