[PATCH 3/3] strtol.3: EXAMPLES: Simplify errno checking (no expected change in behavior)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Alejandro Colomar <colomar.6.4.3@xxxxxxxxx>
---
 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




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux