Re: [PATCH] maint: Kill usage of atoi()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]