[PATCH 2/3] strtol.3: EXAMPLES: As the default base, use special value 0

[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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man3/strtol.3 b/man3/strtol.3
index 0feb12dbb..35252295e 100644
--- a/man3/strtol.3
+++ b/man3/strtol.3
@@ -266,7 +266,7 @@ main(int argc, char *argv[])
     }
 
     str = argv[1];
-    base = (argc > 2) ? atoi(argv[2]) : 10;
+    base = (argc > 2) ? atoi(argv[2]) : 0;
 
     errno = 0;    /* To distinguish success/failure after call */
     val = strtol(str, &endptr, base);
-- 
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