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

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

 



On 11/14/13 17:53, Eric Blake wrote:
> On 11/14/2013 09:48 AM, Peter Krempa wrote:
>> Kill the use of atoi() and introduce syntax check to forbit it and it's
> 
> s/forbit/forbid/
> 
>> friends (atol, atoll, atof, atoq).
>>
>> Also fix a typo in variable name holding the cylinders count of a disk
>> pool (apparently unused).
>> ---
>>  cfg.mk                             |  9 +++++++++
>>  src/conf/storage_conf.h            |  2 +-
>>  src/qemu/qemu_command.c            |  8 ++++++--
>>  src/storage/storage_backend_disk.c | 14 +++++++++-----
>>  src/xen/xend_internal.c            | 17 +++++++++++++----
>>  5 files changed, 38 insertions(+), 12 deletions(-)
>>
>> diff --git a/cfg.mk b/cfg.mk
> 
>> @@ -1040,3 +1046,6 @@ exclude_file_name_regexp--sc_prohibit_int_ijk = \
>>
>>  exclude_file_name_regexp--sc_prohibit_getenv = \
>>    ^tests/.*\.[ch]$$
>> +
>> +exclude_file_name_regexp--sc_prohibit_atoi= \
>> +	^examples/.*\.[ch]$$
> 
> Drop this hunk.  None of our examples/* use atoi to begin with, so
> there's no reason to exclude them from the syntax check.
> 
> ACK with those fixes.
> 

This isn't true unfortunately:

~/libvirt $ git grep atoi examples/
examples/domsuspend/suspend.c:        id = atoi(argv[1]);

and I wanted to avoid changing that file. But if you insist I can tune
that one too.

Peter


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]