[Bug 241254] atoi(3) wrongly states that atoi() is equivalent to (int)strtol(nptr, (char **)NULL, 10);
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Oct 15 03:11:32 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241254
Bug ID: 241254
Summary: atoi(3) wrongly states that atoi() is equivalent to
(int)strtol(nptr, (char **)NULL, 10);
Product: Documentation
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: Manual Pages
Assignee: bugs at FreeBSD.org
Reporter: yuri at freebsd.org
CC: doc at FreeBSD.org
strtol(3) parses the string as 'long' and long is 64-bit on amd64, and int is
32-bit, so they can't be equivalent.
> DESCRIPTION
> The atoi() function converts the initial portion of the string pointed to
> by nptr to int representation.
>
> It is equivalent to:
>
> (int)strtol(nptr, (char **)NULL, 10);
>
> The atoi() function has been deprecated by strtol() and should not be
> used in new code.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the freebsd-doc
mailing list