Aug. 10, 2021
12:58 p.m.
Guy Harris via tz <tz@iana.org> writes:
On Aug 9, 2021, at 3:55 PM, Jan Engelhardt via tz <tz@iana.org> wrote:
tzload then returns errno, which is 0 under these pretenses, thereby signalling to its caller that everything was fine, when it fact it wasn't.
Then it should be fixed not to do so, e.g. by returning ENOMEM if errno is 0.
I'm not quite sure which part you're saying should be fixed. But it's entirely legal per C99 (not POSIX) for malloc not to bother setting errno. AFAICS, C99 doesn't even specify the existence of ENOMEM. regards, tom lane