svn commit: r285552 - head/usr.bin/xargs

Xin Li delphij at delphij.net
Wed Jul 15 00:02:33 UTC 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 07/14/15 15:48, Pedro Giffuni wrote:
> 
> 
> On 07/14/15 15:44, Xin Li wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
>> 
>> On 07/14/15 13:29, Garrett Cooper wrote:
>>> On Jul 14, 2015, at 12:16, Baptiste Daroussin
>>> <bapt at FreeBSD.org> wrote:
>>> 
>>>> Author: bapt Date: Tue Jul 14 19:16:14 2015 New Revision:
>>>> 285552 URL: https://svnweb.freebsd.org/changeset/base/285552
>>>> 
>>>> Log: Convert atoi(3) to stronum(3) which allows to arguments
>>>> and report proper errors to the users
>>> Is strtonum preferred over strtoll, etc?
>> strtonum(3) is a wrapper of strtoll() and provides more
>> functionality like range checking, so I think the answer would be
>> yes.
> 
> There is only the issue that strtonum(3) is non-standard so I have
> resisted the temptation to blindly replace atoi(3) in existing
> code.

Well, that's true, but what Baptiste done was to address a specific
issue with the existing code (to provide better error message) so I
don't think that counts as a simple wholesale replacement from one API
to another API.

Cheers,
- -- 
Xin LI <delphij at delphij.net>    https://www.delphij.net/
FreeBSD - The Power to Serve!           Live free or die
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.1.6 (FreeBSD)

iQIcBAEBCgAGBQJVpaMXAAoJEJW2GBstM+nspRwP/2hRY54SkxknEyCVP8+l7U6W
kmtX4ErcVHBVri+9oW04GFX6Pu5/8uTZZTh7ALLzGIUprBqGhcDwbTTD+9Gw/ha7
PKliR33zYoqIMg7DNHXI8nSXh2nq4AaTucWnO9Vl0vNtRR8jDvmzCF03ukHv4JlX
2ES/sL2ruToI6wwk9fWnLqJ3lhZO2aXVmbrLyzsWiaQCKNCKWe/LhP1IhGwTFvra
HmOKXl+FC0PosYQ8LBhiu8GSuK3wWmoIWOCAQ5TmhHD4UFU57sBS2bTxXekrradu
PEnz0W+ZCpgy5XXot6VBXOjoLU/Dm3RYt4un/ot11y/FZCVnh+RfbzJXFJUSuQ6A
6hyqBi3NoSD5k0e8ei9frJennDT23ucuffPKaYC9EMCjki7sJCf9Nn3t0x3sBdvZ
q3EJyIdAHmRQZxessRnkJGZA74kJBHa3yzIATBL58EpDFIJABK2reomEhwNEBnKS
V01xQzMm4YqJ5dy89ZE81SD8+3b9N2HNnMoA7LsJGa3hcVVOnfKNPDMYH8YEpZu0
JwQOBg2k04AkwfWqkW97/av1nOmwg5H7/Zm7dEGU6KcPl49NzfnnH5WYsBT8R2N3
8tAMwddNzNAWKvDya0qH0sPFw3YiyLtPA+e7S54iDroTyiWCXBuYLfzQEkC+bQzX
zxsjdL+FPfBuK76YuM1l
=MYtY
-----END PGP SIGNATURE-----


More information about the svn-src-all mailing list