From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59061) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKWPg-0003fr-K0 for qemu-devel@nongnu.org; Wed, 29 Jul 2015 14:49:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZKWPc-0005GN-9o for qemu-devel@nongnu.org; Wed, 29 Jul 2015 14:49:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36326) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKWPc-0005GG-44 for qemu-devel@nongnu.org; Wed, 29 Jul 2015 14:49:08 -0400 References: From: Eric Blake Message-ID: <55B9201E.3010505@redhat.com> Date: Wed, 29 Jul 2015 12:49:02 -0600 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="iiLTRpqijmdVfVgavRt4IGeIUvbaLW9x5" Subject: Re: [Qemu-devel] [PATCH v3 0/5] cutils: Add qemu_strto*l() wrappers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Carlos L. Torres" , qemu-devel@nongnu.org Cc: pbonzini@redhat.com, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --iiLTRpqijmdVfVgavRt4IGeIUvbaLW9x5 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 07/19/2015 05:02 PM, Carlos L. Torres wrote: > From: "Carlos L. Torres" >=20 > 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. >=20 > Different from the C strto*l() functions, these wrappers > return through the 'result' out parameter. >=20 > 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? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --iiLTRpqijmdVfVgavRt4IGeIUvbaLW9x5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVuSAeAAoJEKeha0olJ0NqjBwH/1dSw3GLpm5cKueJziAXCcVk T3/LS/ZQEee01JGC7tqdTY6HaMyFwg8hnTbe9piGd/9LqfNfrAHQJWGYMxcaMTeM 7bo7N949btQecXInt+i1jd/iKS+jVwtVaE47tLg8TL1WVKC2HTdos/rlBq1wiluB myfSnIx8vCaHzvPP2YRPs7okIX4nFo71EpjDQoUvb4XjUkWtkze94/pc7j41MJGo oQ/pAQznTXyq03MzBIfsJhZhgWoZCcoYshTMH+W3awGKyjKWSgQAl0gsq2yfseQ8 ZN+unUCrOY9rNAGB8RVgUb+3l4yx7oWtnIqYQWyc9UCLLIrsjGzgQivud8wKmPM= =udrl -----END PGP SIGNATURE----- --iiLTRpqijmdVfVgavRt4IGeIUvbaLW9x5--