atoi.3: Add NOTES section explaining 0 return value on error

And note that this is not specified by POSIX.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2020-06-19 14:19:27 +02:00
parent 5e297c356e
commit f00c7b5b41
1 changed files with 5 additions and 0 deletions

View File

@ -126,6 +126,11 @@ only.
.\" .BR atoll () .\" .BR atoll ()
.\" function is present in glibc 2 since version 2.0.2, but .\" function is present in glibc 2 since version 2.0.2, but
.\" not in libc4 or libc5. .\" not in libc4 or libc5.
.SH NOTES
POSIX.1 leaves the return value of
.BR atoi ()
on error unspecified.
On glibc, musl libc, and uClibc, 0 is returned on error.
.SH SEE ALSO .SH SEE ALSO
.BR atof (3), .BR atof (3),
.BR strtod (3), .BR strtod (3),