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

Eric Blake eblake at redhat.com
Thu Nov 14 16:53:28 UTC 2013


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.

-- 
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/ba286945/attachment-0001.sig>


More information about the libvir-list mailing list