From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1cOpUY-000659-AK for mharc-qemu-trivial@gnu.org; Wed, 04 Jan 2017 12:36:50 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60548) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cOpUV-00063K-CG for qemu-trivial@nongnu.org; Wed, 04 Jan 2017 12:36:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cOpUU-0000zh-FY for qemu-trivial@nongnu.org; Wed, 04 Jan 2017 12:36:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47182) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cOpUP-0000v4-NL; Wed, 04 Jan 2017 12:36:41 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C09663B71B; Wed, 4 Jan 2017 17:36:41 +0000 (UTC) Received: from [10.10.117.58] (ovpn-117-58.rdu2.redhat.com [10.10.117.58]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v04Haesn008720; Wed, 4 Jan 2017 12:36:41 -0500 To: Paolo Bonzini , qemu-devel@nongnu.org References: <20170104145914.3361-1-pbonzini@redhat.com> Cc: qemu-trivial@nongnu.org From: Eric Blake Openpgp: url=http://people.redhat.com/eblake/eblake.gpg Organization: Red Hat, Inc. Message-ID: <8467bc31-f5ac-3d8e-483c-a6d8199d45bc@redhat.com> Date: Wed, 4 Jan 2017 11:36:39 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20170104145914.3361-1-pbonzini@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="aodIuNGsHTlgqILQDaWJHUkpIlF0n8CJg" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 04 Jan 2017 17:36:41 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] block: remove dead check X-BeenThere: qemu-trivial@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jan 2017 17:36:48 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --aodIuNGsHTlgqILQDaWJHUkpIlF0n8CJg Content-Type: multipart/mixed; boundary="Vj3tefj0Bqi2hWaciaGEM1dxvUaAtnleR"; protected-headers="v1" From: Eric Blake To: Paolo Bonzini , qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org Message-ID: <8467bc31-f5ac-3d8e-483c-a6d8199d45bc@redhat.com> Subject: Re: [Qemu-devel] [PATCH] block: remove dead check References: <20170104145914.3361-1-pbonzini@redhat.com> In-Reply-To: <20170104145914.3361-1-pbonzini@redhat.com> --Vj3tefj0Bqi2hWaciaGEM1dxvUaAtnleR Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 01/04/2017 08:59 AM, Paolo Bonzini wrote: > options must be non-NULL here, because a NULL value is replaced with > qdict_new earlier in the function. Reported by Coverity. >=20 > Signed-off-by: Paolo Bonzini > --- > block.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Eric Blake >=20 > diff --git a/block.c b/block.c > index 39ddea3..a0346c8 100644 > --- a/block.c > +++ b/block.c > @@ -1851,7 +1851,7 @@ static BlockDriverState *bdrv_open_inherit(const = char *filename, > bdrv_refresh_filename(bs); > =20 > /* Check if any unknown options were used */ > - if (options && (qdict_size(options) !=3D 0)) { > + if (qdict_size(options) !=3D 0) { > const QDictEntry *entry =3D qdict_first(options); > if (flags & BDRV_O_PROTOCOL) { > error_setg(errp, "Block protocol '%s' doesn't support the = option " >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --Vj3tefj0Bqi2hWaciaGEM1dxvUaAtnleR-- --aodIuNGsHTlgqILQDaWJHUkpIlF0n8CJg 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/ iQEcBAEBCAAGBQJYbTKnAAoJEKeha0olJ0Nqd5EH/0eANKjWBHJZSi+0wbVisl3D mevt/7fdh+gHYh49Dzff2MpoS5nkD4EJ5Oa5VpPk5TxNfqGZ20mWY7NdJYuHAvE9 X66rZ7b4YBBfwjWediBRE8Kg8pi3p2uxKlPpesrTcYS5GzvAWs6O8IN1bkk/hYz0 faw36r5j57X8uZYtsw22x6MT0Ql7YGPG8EY0EYzt/ka+g8JrtLAJnMW7G7WF2H6v St7cX6P4ob3Yx7TRBH4S0odlDoxNojRpqTaQvwSqLOTva3RJAE8xpfmp4r3Mj1RM ZMzurmKRsqy/qb0xUVsQtvjohsc+hYIK//mwqMh20wcjAuE3NfKn7l1BHOY7SaU= =RFNV -----END PGP SIGNATURE----- --aodIuNGsHTlgqILQDaWJHUkpIlF0n8CJg--