Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Oct 2019 03:11:31 +0000
From:      bugzilla-noreply@freebsd.org
To:        doc@FreeBSD.org
Subject:   [Bug 241254] atoi(3) wrongly states that atoi() is equivalent to (int)strtol(nptr, (char **)NULL, 10);
Message-ID:  <bug-241254-9@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D241254

            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@FreeBSD.org
          Reporter: yuri@freebsd.org
                CC: doc@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 point=
ed to
>      by nptr to int representation.
>=20
>      It is equivalent to:
>=20
>            (int)strtol(nptr, (char **)NULL, 10);
>=20
>      The atoi() function has been deprecated by strtol() and should not be
>      used in new code.

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-241254-9>