qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 0/5] cutils: Add qemu_strto*l() wrappers


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v3 0/5] cutils: Add qemu_strto*l() wrappers
Date: Wed, 29 Jul 2015 12:49:02 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

On 07/19/2015 05:02 PM, Carlos L. Torres wrote:
> From: "Carlos L. Torres" <address@hidden>
> 
> Introduce qemu_ wrappers for strtol/strtoul/strtoll/strtoull
> C functions, ensure that errno is checked, and if NULL is
> passed as the endptr argument, then whole string has to be
> a valid number on the given base, otherwise return appropriate
> error.
> 
> Different from the C strto*l() functions, these wrappers
> return through the 'result' out parameter.
> 
> Include unit-tests for each wrapper function.

Can you also patch scripts/check-patch.pl to forcefully warn developers
when they are introducing bogus uses of strto*l() and should be using
the sane wrappers instead?

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]