strtol doesn't set errno = EINVAL if conversion failed
strtol doesn't set errno = EINVAL if conversion failed, while http://pubs.opengroup.org/onlinepubs/009695399/functions/strtol.html specifies that errno may be set - we do that if base is invalid, and we could do that in the case when conversion couldn't be performed.
#1 Updated by Gordon Ross almost 5 years ago
- Status changed from New to Resolved
changeset: 13478:b5ecd19f36a6 user: Yakov Zaytsev <email@example.com> date: Wed Oct 05 05:23:02 2011 -0700 description: 1470 strtol doesn't set errno = EINVAL if conversion failed Reviewed by: Gordon Ross <firstname.lastname@example.org> Reviewed by: Jason King <email@example.com> Reviewed by: Gary Mills <firstname.lastname@example.org> Reviewed by: Garrett D'Amore <email@example.com> Approved by: Eric Schrock <Eric.Schrock@delphix.com>
Also available in: Atom