On 07/19/2015 05:02 PM, Carlos L. Torres wrote: > From: "Carlos L. Torres" <carlos.tor...@rackspace.com> > > 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