[PATCH v2] strtol.3, strtoul.3: ERRORS: Clarify that these don't set errno on success

Alejandro Colomar alx@kernel.org
Thu Nov 30 23:07:20 GMT 2023


That's a guarantee made by POSIX.

Reported-by: Jakub Wilk <jwilk@jwilk.net>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: Iker Pedrosa <ipedrosa@redhat.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
---
 man3/strtol.3  | 3 +++
 man3/strtoul.3 | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/man3/strtol.3 b/man3/strtol.3
index 01c658025..1f1f98216 100644
--- a/man3/strtol.3
+++ b/man3/strtol.3
@@ -124,6 +124,9 @@ .SH RETURN VALUE
 and
 .BR LONG_MAX ).
 .SH ERRORS
+This function does not modify
+.I errno
+on success.
 .TP
 .B EINVAL
 (not in C99)
diff --git a/man3/strtoul.3 b/man3/strtoul.3
index a01a1d8db..32bd36dfc 100644
--- a/man3/strtoul.3
+++ b/man3/strtoul.3
@@ -124,6 +124,9 @@ .SH RETURN VALUE
 instead of
 .BR ULONG_MAX ).
 .SH ERRORS
+This function does not modify
+.I errno
+on success.
 .TP
 .B EINVAL
 (not in C99)
-- 
2.42.0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-help/attachments/20231201/09b97592/attachment.sig>


More information about the Libc-help mailing list