From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60580) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XteNY-0003Q7-Rq for qemu-devel@nongnu.org; Wed, 26 Nov 2014 10:19:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XteNT-0004m8-Tu for qemu-devel@nongnu.org; Wed, 26 Nov 2014 10:19:40 -0500 Message-ID: <5475EF72.40303@redhat.com> Date: Wed, 26 Nov 2014 08:19:14 -0700 From: Eric Blake MIME-Version: 1.0 References: <1416924485-13304-1-git-send-email-mreitz@redhat.com> <1416924485-13304-2-git-send-email-mreitz@redhat.com> <87h9xm4e8u.fsf@blackfin.pond.sub.org> <547599A1.5080100@redhat.com> In-Reply-To: <547599A1.5080100@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="eQv1F7VLW7aXgoMfEMNnA9aARw9S3PNAD" Subject: Re: [Qemu-devel] [PATCH 01/12] block: qcow2 driver may not be found List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , Markus Armbruster Cc: Kevin Wolf , Peter Lieven , qemu-devel@nongnu.org, Stefan Hajnoczi , qemu-stable@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --eQv1F7VLW7aXgoMfEMNnA9aARw9S3PNAD Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/26/2014 02:13 AM, Max Reitz wrote: > On 2014-11-26 at 08:23, Markus Armbruster wrote: >> Max Reitz writes: >> >>> Albeit absolutely impossible right now, bdrv_find_format("qcow2") may= >>> fail. bdrv_append_temp_snapshot() should heed that case. >> Impossible because we always compile in bdrv_qcow2. >=20 >>> +++ b/block.c >>> @@ -1320,6 +1320,12 @@ int bdrv_append_temp_snapshot(BlockDriverState= >>> *bs, int flags, Error **errp) >>> } >>> bdrv_qcow2 =3D bdrv_find_format("qcow2"); >>> + if (!bdrv_qcow2) { Would it be shorter to 'assert(bdrv_qcow2);' to still silence Coverity? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --eQv1F7VLW7aXgoMfEMNnA9aARw9S3PNAD 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 iQEcBAEBCAAGBQJUde9yAAoJEKeha0olJ0NqYJ8H/RrGy/5RyZEai74ZfmOWJ1L2 VEnAlAbMKAF8hk9Nwwt2fXzYOp+Q5aNQDWCW26P7w2yv4yfR3klScmS2lf99s1WU Q+6oTdAiYldL69WlXqJeDvVnB4z4r2eY9AG6Yc99tf69AnbQ7SKzb1gAvDJSe2pU RMBU3ZMdaMTqC7Z/pU1hZ8FdgiFwxRuCwURYvkSCHVsZqxv9ZhQ/Yynpo1COP3zI 480cI2ErM/wRhz+UDpZ6Yiecey4EBhy/FjryAghsm8TrBhUsO+M02AA114OSnjMg 6WfuT8glbSAbcMe0ZnVrGJjm/j+Lp3o2dBRauCZvYqNoBD+WUVxq0taiGU4EGkg= =qm6G -----END PGP SIGNATURE----- --eQv1F7VLW7aXgoMfEMNnA9aARw9S3PNAD--