From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38667) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmR8x-0005Q9-V4 for qemu-devel@nongnu.org; Mon, 19 May 2014 13:14:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WmR8s-0008Jt-Ks for qemu-devel@nongnu.org; Mon, 19 May 2014 13:14:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:10129) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmR8s-0008Jk-CD for qemu-devel@nongnu.org; Mon, 19 May 2014 13:14:26 -0400 Message-ID: <537A3BEF.5050800@redhat.com> Date: Mon, 19 May 2014 11:14:23 -0600 From: Eric Blake MIME-Version: 1.0 References: <1400518658-2515-1-git-send-email-armbru@redhat.com> <1400518658-2515-2-git-send-email-armbru@redhat.com> In-Reply-To: <1400518658-2515-2-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qvkNDFi0WGiVIJqfiflHt89x8A2cXO4Fr" Subject: Re: [Qemu-devel] [PATCH v2 1/5] char: Use return values instead of error_is_set(errp) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org Cc: pbonzini@redhat.com, kraxel@redhat.com, aliguori@amazon.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --qvkNDFi0WGiVIJqfiflHt89x8A2cXO4Fr Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 05/19/2014 10:57 AM, Markus Armbruster wrote: > Using error_is_set(errp) to check whether a function call failed is > fragile: it breaks when errp is null. Check perfectly suitable return > values instead when possible. As far as I can tell, errp can't be > null there, but this is more robust and more obviously correct >=20 > Signed-off-by: Markus Armbruster > --- > qemu-char.c | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --qvkNDFi0WGiVIJqfiflHt89x8A2cXO4Fr Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTejvvAAoJEKeha0olJ0NqxYoIAKo7XznKZr10g4AwMjAqx75z +ZtU6bKexYJb90uB325Y4fdjFKhRSY7fowvHhDiYeiWNitwUE6+yOiJAWZI5PYY1 ePZ4FUFjOFcKtVdMWSC93d5UiI0b+d4cqg3l/q/H0A3LedYbK5RR/n/XUgKzJajo S1qycoAazkZtudksiWUUvuCxQChIa7U76GwTM3WeecZZ1hwAOqig4UydPajSssu/ 3s2OTiWMoFvhL+f6UPd5QUmmX8NrK2jNt0jF4AkRgc2dV7BqGvm01nfL6AwE/JcR sMzcMJOMuPunHsr9l2BppKB//d4U+cX0FsSPb1ny/cOb8eC9o9ljWZ4jH+ZHw5g= =B1FC -----END PGP SIGNATURE----- --qvkNDFi0WGiVIJqfiflHt89x8A2cXO4Fr--