From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42467) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXEhU-00037m-Iw for qemu-devel@nongnu.org; Mon, 07 Apr 2014 14:55:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WXEhP-0002kU-HW for qemu-devel@nongnu.org; Mon, 07 Apr 2014 14:55:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41721) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXEhP-0002k9-74 for qemu-devel@nongnu.org; Mon, 07 Apr 2014 14:55:15 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s37ItCmu030212 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 7 Apr 2014 14:55:14 -0400 Message-ID: <5342F48F.8020805@redhat.com> Date: Mon, 07 Apr 2014 12:55:11 -0600 From: Eric Blake MIME-Version: 1.0 References: <1396891800-8627-1-git-send-email-mreitz@redhat.com> <1396891800-8627-3-git-send-email-mreitz@redhat.com> In-Reply-To: <1396891800-8627-3-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="7A3HD4SR8rgsStQRnXbR6MTqbxU2POLKJ" Subject: Re: [Qemu-devel] [PATCH 2/4] block-commit: speed is an optional parameter List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --7A3HD4SR8rgsStQRnXbR6MTqbxU2POLKJ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 04/07/2014 11:29 AM, Max Reitz wrote: > As speed is an optional parameter for the QMP block-commit command, it > should be set to 0 if not given (as it is undefined if has_speed is > false), that is, the speed should not be limited. >=20 > Signed-off-by: Max Reitz > --- > blockdev.c | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/blockdev.c b/blockdev.c > index 0be4601..337c11f 100644 > --- a/blockdev.c > +++ b/blockdev.c > @@ -1876,6 +1876,7 @@ void qmp_block_commit(const char *device, > */ > BlockdevOnError on_error =3D BLOCKDEV_ON_ERROR_REPORT; > =20 > + speed =3D speed ? speed : 0; Oops, branching based on the contents of an undefined variable. You meant has_speed in the second of the three uses. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --7A3HD4SR8rgsStQRnXbR6MTqbxU2POLKJ 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/ iQEcBAEBCAAGBQJTQvSPAAoJEKeha0olJ0Nq25oIALDhZvBRHAu7Zl9JjQnAIgfc B3wF18CkofkVxMLUeavsF753B5KIh317WprwG3/USJVdyR1mCFZy6glf0mvp6Wu2 yogQ8LLDeaBvFBRKOnNluMOjT5pDmNODvzTggORizXe9W6jaaDhinkQhN2kObfVT wMH4/aveZu4OX2/PKL6xwoRop5tU4ENTCTlbCx91VQNfD4M13wUTrBYW79VAgDgw M8+JUdWXjFm8CeKrl1IIT3PN8sR04znK4A9+xE9Hsr5jGStjItJ6fRh1/8KMfqzi iAhXFmQLQAocKk8IQrNUiQiLKxOQo4x9PHXOohCX9P7ZpSUItxNX64RE21IP/Is= =emnV -----END PGP SIGNATURE----- --7A3HD4SR8rgsStQRnXbR6MTqbxU2POLKJ--