From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNlRh-0001Qs-Bh for qemu-devel@nongnu.org; Tue, 17 Feb 2015 11:56:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YNlRc-00046X-Ac for qemu-devel@nongnu.org; Tue, 17 Feb 2015 11:56:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58547) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNlRc-00046S-1s for qemu-devel@nongnu.org; Tue, 17 Feb 2015 11:56:20 -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 t1HGuJTO021695 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 17 Feb 2015 11:56:19 -0500 Message-ID: <54E372B2.9010604@redhat.com> Date: Tue, 17 Feb 2015 09:56:18 -0700 From: Eric Blake MIME-Version: 1.0 References: <1423600146-7642-1-git-send-email-mreitz@redhat.com> <1423600146-7642-5-git-send-email-mreitz@redhat.com> <20150217101952.GD4213@noname.str.redhat.com> In-Reply-To: <20150217101952.GD4213@noname.str.redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qfMxi2niHnlnTwIkCWwGUclRgBs4p5PkH" Subject: Re: [Qemu-devel] [PATCH v6 04/24] qcow2: Only return status from qcow2_get_refcount List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , Max Reitz Cc: qemu-devel@nongnu.org, Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --qfMxi2niHnlnTwIkCWwGUclRgBs4p5PkH Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/17/2015 03:19 AM, Kevin Wolf wrote: >> if (num_fixed) { >> ret =3D update_refcount(bs, i << s->cluster_bits, 1, >> - refcount2 - refcount1, >> + (int)refcount2 - (int)refcount1= , >> QCOW2_DISCARD_ALWAYS); >> if (ret >=3D 0) { >> (*num_fixed)++; >=20 > Wouldn't both refcounts be promoted to int anyway, even without a cast?= > But then, being explicit probably can't hurt either. But it all goes away in the next patch that switches to uint64_t, so I don't mind the temporary ugliness. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --qfMxi2niHnlnTwIkCWwGUclRgBs4p5PkH 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/ iQEcBAEBCAAGBQJU43KyAAoJEKeha0olJ0Nqh3MH+wWh+RqtCcYm6vcpJ9J7UxGb wdfl0I/gezxWzCzuVxw2IJqLzNfDl7Ql+BKMIBzAGjDoILaHJBJWd60ZPeo9Rlnb ZwVHLaAudvdlCYj3z5KMLcv/WMyj6GVDrzVF6wKlw4f1l54LSi4k1rwrmOBJKweu H2t9+uwGBYZcMmGin5ySMKZ1xAKhac2s/jFbBHnQDLAj46pYOAsRxZDkPoNZ7ko3 CVr5tE9hRHDNs3yzpBc/raxHOrUe3KXSXPlZ6mosO67EhLLAR2N4FHbirNFPE+ED tNDFz+KobqcBIfb3SvmYTErR97jBOeVITxFDg4z56Rplz8H/MxEKouzPxhvEKNE= =vmMp -----END PGP SIGNATURE----- --qfMxi2niHnlnTwIkCWwGUclRgBs4p5PkH--