From f00c7b5b4139ee54d675ea98630d09500a09b34d Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Fri, 19 Jun 2020 14:19:27 +0200 Subject: [PATCH] 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 --- man3/atoi.3 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/man3/atoi.3 b/man3/atoi.3 index 3c6527a5b..87d1e1efd 100644 --- a/man3/atoi.3 +++ b/man3/atoi.3 @@ -126,6 +126,11 @@ only. .\" .BR atoll () .\" function is present in glibc 2 since version 2.0.2, but .\" 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 .BR atof (3), .BR strtod (3),