From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38696) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwK4X-0004Pc-KM for qemu-devel@nongnu.org; Wed, 03 Dec 2014 19:15:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XwK4S-0007W0-Hk for qemu-devel@nongnu.org; Wed, 03 Dec 2014 19:15:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44266) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwK4S-0007Vv-8R for qemu-devel@nongnu.org; Wed, 03 Dec 2014 19:15:00 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sB40ExD2017955 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 3 Dec 2014 19:14:59 -0500 Message-ID: <547F96D3.7040605@redhat.com> Date: Wed, 03 Dec 2014 15:03:47 -0800 From: Eric Blake MIME-Version: 1.0 References: <1417613866-25890-1-git-send-email-mreitz@redhat.com> <1417613866-25890-18-git-send-email-mreitz@redhat.com> In-Reply-To: <1417613866-25890-18-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="bRle9iN0rp6sjDhJ4cTGwDoHVa166N1Dj" Subject: Re: [Qemu-devel] [PATCH v4 17/26] progress: Allow regressing progress 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) --bRle9iN0rp6sjDhJ4cTGwDoHVa166N1Dj Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 12/03/2014 05:37 AM, Max Reitz wrote: > Progress may regress; this should be displayed correctly by > qemu_progress_print(). >=20 > While touching that area of code, drop the redundant parentheses in the= > same condition. >=20 > Signed-off-by: Max Reitz > --- > util/qemu-progress.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Eric Blake >=20 > diff --git a/util/qemu-progress.c b/util/qemu-progress.c > index 4ee5cd0..532333e 100644 > --- a/util/qemu-progress.c > +++ b/util/qemu-progress.c > @@ -152,7 +152,8 @@ void qemu_progress_print(float delta, int max) > state.current =3D current; > =20 > if (current > (state.last_print + state.min_skip) || > - (current =3D=3D 100) || (current =3D=3D 0)) { > + current < (state.last_print - state.min_skip) || > + current =3D=3D 100 || current =3D=3D 0) { > state.last_print =3D state.current; > state.print(); > } >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --bRle9iN0rp6sjDhJ4cTGwDoHVa166N1Dj 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 iQEcBAEBCAAGBQJUf5bTAAoJEKeha0olJ0NqVqcH/0LYlcklvDhDNcq7L2wVkCpU C8GbdVUufCYEs3Jpsmz6KCZFrstsAqwj4rd7y+Eawa2yKg+vHhBBv4rO7bFX2VA5 hi/muet3ckuwAAfRRiq7cUXUF8KFAuGCg0cqIBqGbxSL6vlPvq0lKIVmJQCMXdkn L3Op9B9VsN0BAfwzeXFefniztZiHX9AzFG95oiAqq4n7+t1pUVNd/aRSg8Ni6o9l CdkOWYVwejxaYUfkQhR/AF17NAROenXSC3mkNjVK9YTwkcF/q5f1SG+FZrBe0usV 5t6VDT1IXjFTflNon27+4jh3qthO9RcHH6PBNBayP+4YIrEtZygL6TY+0fhraT8= =Lif7 -----END PGP SIGNATURE----- --bRle9iN0rp6sjDhJ4cTGwDoHVa166N1Dj--