[libvirt] [PATCH] maint: Kill usage of atoi()
Eric Blake
eblake at redhat.com
Thu Nov 14 16:28:44 UTC 2013
On 11/14/2013 09:20 AM, Peter Krempa wrote:
> Also fix a typo in variable name holding the cylinders count of a disk
> pool (apparently unused).
If we're going to kill atoi(), let's also kill atof, atol, atoq, atoll.
Oh, and maint.mk already has a rule that does this; we just have it
disabled because we aren't clean yet (it also prohibits *scanf, because
that also has undefined behavior on overflow; but we haven't scrubbed
our sources to get rid of scanf usage).
>
> +sc_prohibit_atoi:
> + @prohibit='\batoi *\(' \
> + exclude='exempt from syntax-check' \
What are we exempting? You can probably drop this line.
> + halt='Use virStrToLong* instead of atoi' \
This at least is a more specific message than the generic check in maint.mk.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20131114/e7795a68/attachment-0001.sig>
More information about the libvir-list
mailing list