From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCsmE-0006Oh-VK for qemu-devel@nongnu.org; Mon, 10 Feb 2014 10:28:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WCslg-0007ae-Aj for qemu-devel@nongnu.org; Mon, 10 Feb 2014 10:28:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52692) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCslg-0007ZA-1y for qemu-devel@nongnu.org; Mon, 10 Feb 2014 10:27:32 -0500 Message-ID: <52F8EFDC.2060804@redhat.com> Date: Mon, 10 Feb 2014 08:27:24 -0700 From: Eric Blake MIME-Version: 1.0 References: <1392042045-31525-1-git-send-email-armbru@redhat.com> <1392042045-31525-13-git-send-email-armbru@redhat.com> In-Reply-To: <1392042045-31525-13-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="H1u5FJmiipNIfeQKD2PH1rE7h6FCtkVP0" Subject: Re: [Qemu-devel] [PATCH 12/13] qapi: Clean up superfluous null check in qapi_dealloc_type_str() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com, mdroth@linux.vnet.ibm.com, aliguori@amazon.com, peter.maydell@linaro.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --H1u5FJmiipNIfeQKD2PH1rE7h6FCtkVP0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 02/10/2014 07:20 AM, Markus Armbruster wrote: > Argument can't be null. No other Visitor method type_str() checks for > null. >=20 > Signed-off-by: Markus Armbruster > --- > qapi/qapi-dealloc-visitor.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) Reviewed-by: Eric Blake >=20 > diff --git a/qapi/qapi-dealloc-visitor.c b/qapi/qapi-dealloc-visitor.c > index dc53545..d0ea118 100644 > --- a/qapi/qapi-dealloc-visitor.c > +++ b/qapi/qapi-dealloc-visitor.c > @@ -131,9 +131,7 @@ static void qapi_dealloc_end_list(Visitor *v, Error= **errp) > static void qapi_dealloc_type_str(Visitor *v, char **obj, const char *= name, > Error **errp) > { > - if (obj) { > - g_free(*obj); > - } > + g_free(*obj); > } > =20 > static void qapi_dealloc_type_int(Visitor *v, int64_t *obj, const char= *name, >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --H1u5FJmiipNIfeQKD2PH1rE7h6FCtkVP0 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/ iQEcBAEBCAAGBQJS+O/cAAoJEKeha0olJ0NqDyMIAJyAdPV6JYLee+Fbp8E6tqb/ 5yNZQ2k1eU1AvI20kxYaYMhoAKGX64IIObLdLqtNb2LWp3mkKpR8fbsEy9liW/uT lrflL1CfF8IgrzBPjk9t97636T39VMqqQ1EA25QywUOFGfSFg3PL8y6MSlRwtNQj rvyv74BIRMM4fO6gJHJNqDlqLZL56srsmYcbd50svct6gOAoznz8GJaxmxSOHxMw gMl3DVk2DlR4Kam/Hq60wDuDkN+0YpP7uK2RnqfrFU8gFQSWo/3Hj1z8BoZsc5Jo fJNqNcTsdhGu3agGXoLofjJqspRuxRfxtfjDFY1n+2NgPOHr+PDJ/T1KYT0DTAo= =HbbC -----END PGP SIGNATURE----- --H1u5FJmiipNIfeQKD2PH1rE7h6FCtkVP0--