All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx@kernel.org>
To: linux-man@vger.kernel.org
Cc: Alejandro Colomar <alx@kernel.org>,
	libc-help@sourceware.org, ~hallyn/shadow@lists.sr.ht,
	Jakub Wilk <jwilk@jwilk.net>, Florian Weimer <fweimer@redhat.com>,
	Iker Pedrosa <ipedrosa@redhat.com>,
	Michael Kerrisk <mtk.manpages@gmail.com>
Subject: [PATCH v2] strtol.3, strtoul.3: ERRORS: Clarify that these don't set errno on success
Date: Fri, 1 Dec 2023 00:07:20 +0100	[thread overview]
Message-ID: <20231130230635.4004-3-alx@kernel.org> (raw)
In-Reply-To: <20231130152910.322395-2-alx@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 949 bytes --]

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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      parent reply	other threads:[~2023-11-30 23:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-30 15:29 [PATCH 1/2] Revert "strtol.3: EXAMPLES: Simplify errno checking" Alejandro Colomar
2023-11-30 15:30 ` [PATCH 2/2] strtol.3: EXAMPLES: Fix error checking Alejandro Colomar
2023-11-30 23:07 ` Alejandro Colomar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231130230635.4004-3-alx@kernel.org \
    --to=alx@kernel.org \
    --cc=fweimer@redhat.com \
    --cc=ipedrosa@redhat.com \
    --cc=jwilk@jwilk.net \
    --cc=libc-help@sourceware.org \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=~hallyn/shadow@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.