HomeFreeBSD

ctime.3: Add a note about a possible return value of localtime(3)

Description

ctime.3: Add a note about a possible return value of localtime(3)

The localtime(3) function returns a NULL pointer, if the passed in-time
translates to a year that will not fit in an integer type. It is stricly
recommended to check the return value to avoid garage output.

Reported by: mckusick
Reviewed by: mckusick, imp, rpokala
Differential Revision: https://reviews.freebsd.org/D36515

(cherry picked from commit 30cfb3c8ee3d3fc79644541207c81d20c72176ce)

Details

Provenance
gbeAuthored on Sep 16 2022, 6:38 PM
Reviewer
mckusick
Differential Revision
D36515: ctime.3: Add a note about a possible return value to the description of localtime(3)
Parents
rGe267c40181bf: uname.1: Clarify the -r option
Branches
Unknown
Tags
Unknown