[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
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v3 0/5] cutils: Add qemu_strto*l() wrappers, Carlos L. Torres, 2015/07/19
- [Qemu-devel] [PATCH v3 5/5] qmp: Add example usage of strto*l() qemu wrapper, Carlos L. Torres, 2015/07/19
- [Qemu-devel] [PATCH v3 1/5] cutils: Add qemu_strtol() wrapper, Carlos L. Torres, 2015/07/19
- [Qemu-devel] [PATCH v3 3/5] cutils: Add qemu_strtoll() wrapper, Carlos L. Torres, 2015/07/19
- [Qemu-devel] [PATCH v3 2/5] cutils: Add qemu_strtoul() wrapper, Carlos L. Torres, 2015/07/19
- [Qemu-devel] [PATCH v3 4/5] cutils: Add qemu_strtoull() wrapper, Carlos L. Torres, 2015/07/19
- Re: [Qemu-devel] [PATCH v3 0/5] cutils: Add qemu_strto*l() wrappers,
Eric Blake <=