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/>
index | next in thread | raw e-mail
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@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 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.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-241254-9>
