From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45738) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4sCd-0002Rk-Fp for qemu-devel@nongnu.org; Tue, 16 Jun 2015 10:51:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4sCZ-0002fP-Rx for qemu-devel@nongnu.org; Tue, 16 Jun 2015 10:51:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54534) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4sCZ-0002ez-Hm for qemu-devel@nongnu.org; Tue, 16 Jun 2015 10:50:59 -0400 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 (Postfix) with ESMTPS id 23EB235BA7F for ; Tue, 16 Jun 2015 14:50:59 +0000 (UTC) Message-ID: <558037D2.6060608@redhat.com> Date: Tue, 16 Jun 2015 08:50:58 -0600 From: Eric Blake MIME-Version: 1.0 References: <1434458200-23440-1-git-send-email-mst@redhat.com> <1434458200-23440-2-git-send-email-mst@redhat.com> <55803671.50208@redhat.com> In-Reply-To: <55803671.50208@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="41WBHv7faww2wWTc2EOFL4xBGfBPRIhvl" Subject: Re: [Qemu-devel] [PATCH RFC 1/3] error: don't rely on pointer comparisons List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" , qemu-devel@nongnu.org Cc: kwolf@redhat.com, armbru@redhat.com, dgilbert@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --41WBHv7faww2wWTc2EOFL4xBGfBPRIhvl Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/16/2015 08:45 AM, Eric Blake wrote: > On 06/16/2015 06:53 AM, Michael S. Tsirkin wrote: >> makes it possible to copy error_abort pointers, >> not just pass them on directly. >> >> Signed-off-by: Michael S. Tsirkin >> --- >> util/error.c | 16 +++++++++++----- >> 1 file changed, 11 insertions(+), 5 deletions(-) >=20 > Where is this patch needed? >=20 > Is the goal to allow: >=20 > Error err =3D error_abort; Oh, my bad for not double checking the layers of indirection involved. The above comment makes no sense type-wise, since error_abort is already 'Error *', and &error_abort is 'Error **'. >=20 > as a way to statically initialize err via copy to behave the same as th= e > global error_abort? >=20 > But that's not how you were using it in patch 3. There, you were > initializing Error *, so using &error_abort is still useful there, and > pointer equality still suffices. >=20 > I don't see a convincing use for this patch. And I retract that, because now I do see the use. Error *local_err =3D ...; as a way to set an abort-on-error pointer requires that we have more than just a global error_abort abort-on-error pointer, but that any number of pointers all resolve to something with embedded properties. Sorry for the confusion on my part, and: Reviewed-by: Eric Blake >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --41WBHv7faww2wWTc2EOFL4xBGfBPRIhvl Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVgDfSAAoJEKeha0olJ0Nq0yMH/igbrPW5mFq8aULKpA7nNrNW JiEai83cvyUijRKzrSbxB5S1mt1kWRoufZ1Q8sxeJ+IKfsVlgJn6sCQEM1yQnS2W VxSyAjPE7C7hl0lwXWIHkyMT9DY0jLU0mUp8uI/E2wAk0CvuqIEftd7InkaKlebz /oFKiykvB1uBz7xlO9tJeMYD6W3CJR/vOOVZOlCdFXHwQUpF57Erwkt/wZajrLdE bcCWkxR2TkZoP1YNncrLXb+7mtHx3ClThHye/86NSLd3OZDdgm9O1ET/QR2ucVfu 9mRNtg2BtOAbhGVpMF0UrxgM4gHQWGDnLCsxFcf/GdxzSzqVavGhOVW0y/e9wlo= =ypPU -----END PGP SIGNATURE----- --41WBHv7faww2wWTc2EOFL4xBGfBPRIhvl--