mirror of https://github.com/mkerrisk/man-pages
strtol.3: EXAMPLES: As the default base, use special value 0
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
d01c330357
commit
b924e6b65a
|
@ -269,7 +269,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);
|
||||
|
|
Loading…
Reference in New Issue