From: Alejandro Colomar <colomar.6.4.3@gmail.com>
To: mtk.manpages@gmail.com
Cc: Alejandro Colomar <colomar.6.4.3@gmail.com>, linux-man@vger.kernel.org
Subject: [PATCH 3/3] strtol.3: EXAMPLES: Simplify errno checking (no expected change in behavior)
Date: Wed, 28 Oct 2020 10:33:08 +0100 [thread overview]
Message-ID: <20201028093308.86310-4-colomar.6.4.3@gmail.com> (raw)
In-Reply-To: <20201028093308.86310-1-colomar.6.4.3@gmail.com>
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
---
man3/strtol.3 | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/man3/strtol.3 b/man3/strtol.3
index 35252295e..6b328fefe 100644
--- a/man3/strtol.3
+++ b/man3/strtol.3
@@ -273,8 +273,7 @@ main(int argc, char *argv[])
/* Check for various possible errors */
- if ((errno == ERANGE && (val == LONG_MAX || val == LONG_MIN))
- || (errno != 0 && val == 0)) {
+ if (errno != 0) {
perror("strtol");
exit(EXIT_FAILURE);
}
--
2.28.0
next prev parent reply other threads:[~2020-10-28 23:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-28 9:33 [PATCH 0/3] Improve strtol(3) example Alejandro Colomar
2020-10-28 9:33 ` [PATCH 1/3] strtol.3: EXAMPLES: Delimit output string using "" Alejandro Colomar
2020-10-28 9:33 ` [PATCH 2/3] strtol.3: EXAMPLES: As the default base, use special value 0 Alejandro Colomar
2020-10-28 9:33 ` Alejandro Colomar [this message]
2020-10-28 10:13 ` [PATCH 0/3] Improve strtol(3) example Michael Kerrisk (man-pages)
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=20201028093308.86310-4-colomar.6.4.3@gmail.com \
--to=colomar.6.4.3@gmail.com \
--cc=linux-man@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox