From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44348) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUJ7E-0007QK-Jv for qemu-devel@nongnu.org; Mon, 22 Apr 2013 11:57:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUJ7D-0005JM-5u for qemu-devel@nongnu.org; Mon, 22 Apr 2013 11:57:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17850) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUJ7C-0005JG-T0 for qemu-devel@nongnu.org; Mon, 22 Apr 2013 11:57:15 -0400 Message-ID: <51755DD7.6040102@redhat.com> Date: Mon, 22 Apr 2013 09:57:11 -0600 From: Eric Blake MIME-Version: 1.0 References: <1366645720-11384-1-git-send-email-kwolf@redhat.com> In-Reply-To: <1366645720-11384-1-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2ECKXRHPMFKKCMIJRHOQF" Subject: Re: [Qemu-devel] [PATCH] block: Fix build with tracing enabled List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: stefanha@redhat.com, qemu-devel@nongnu.org, anthony@codemonkey.ws, afaerber@suse.de This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2ECKXRHPMFKKCMIJRHOQF Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 04/22/2013 09:48 AM, Kevin Wolf wrote: > filename was still uninitialised when it's used as a parameter to a > tracing function, so let's move the initialisation. Also, commit c2ad1b= 0c > forgot to add a NULL check, which this patch adds while we're at it. >=20 > Signed-off-by: Kevin Wolf > --- > block.c | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) >=20 > diff --git a/block.c b/block.c > index 819eb4e..aa9a533 100644 > --- a/block.c > +++ b/block.c > @@ -676,7 +676,13 @@ static int bdrv_open_common(BlockDriverState *bs, = BlockDriverState *file, > assert(bs->file =3D=3D NULL); > assert(options !=3D NULL && bs->options !=3D options); > =20 > - trace_bdrv_open_common(bs, filename, flags, drv->format_name); > + if (file !=3D NULL) { > + filename =3D file->filename; > + } else { > + filename =3D qdict_get_try_str(options, "filename"); > + } > + > + trace_bdrv_open_common(bs, filename ?: "", flags, drv->format_name= ); Yet another case of a non-C99 gcc extension; but as this is not the first use, I'll overlook it, and give: Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2ECKXRHPMFKKCMIJRHOQF 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.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRdV3XAAoJEKeha0olJ0Nqw90H/04E3ooDu6z+3lvokYKOfnEt yZA99xXaBBJZphdLztcjaLKKCTSGy0Day19XI/yTO6jPOkyAwTpwrT5JgbDdFcoU Ah0M4QPVHK0MvwZnQFZCuZN3qUBA/wn1MzkWaAwBLuCycriuLoE2mVlTKK8lha+y YAqD2rlE+wRLXdWRBiNx8KFIZFo4LYm3rfHUxaa6eEP45gsUF8iB11emal1HboQo lmMPTfZyw7OA7GfHwRTB738aDg3FrCsLPKRPQWWCk6bE9UjIslKLEfPFZUy5Mw/j I3VCfdRKiKV0xKr7Vvw3lS/pj7XeIRwIQOvTId4NMm3UsyPO/t87yoEBsN25bJg= =04rs -----END PGP SIGNATURE----- ------enig2ECKXRHPMFKKCMIJRHOQF--