From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56972) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHulr-0002NM-A0 for qemu-devel@nongnu.org; Wed, 22 Jul 2015 10:13:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZHull-00082W-Fm for qemu-devel@nongnu.org; Wed, 22 Jul 2015 10:13:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44528) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHull-00082M-AO for qemu-devel@nongnu.org; Wed, 22 Jul 2015 10:13:13 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id F10324754B6 for ; Wed, 22 Jul 2015 14:13:12 +0000 (UTC) References: <1435001200-20610-1-git-send-email-armbru@redhat.com> <1435001200-20610-8-git-send-email-armbru@redhat.com> <55AE7121.3080509@redhat.com> <87vbdcjo0i.fsf@blackfin.pond.sub.org> From: Eric Blake Message-ID: <55AFA4F1.3090800@redhat.com> Date: Wed, 22 Jul 2015 08:13:05 -0600 MIME-Version: 1.0 In-Reply-To: <87vbdcjo0i.fsf@blackfin.pond.sub.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="B22MijAq92KUU05cQQCcqCosEtjXQWfm1" Subject: Re: [Qemu-devel] [PATCH 7/7] error: On abort, report where the error was created List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: pbonzini@redhat.com, mst@redhat.com, qemu-devel@nongnu.org, dgilbert@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --B22MijAq92KUU05cQQCcqCosEtjXQWfm1 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 07/22/2015 07:54 AM, Markus Armbruster wrote: >> >>> +#define error_setg(errp, fmt, ...) \ >>> + error_setg_internal((errp), __FILE__, __LINE__, (fmt), ## __VA_A= RGS__) >>> +void error_setg_internal(Error **errp, const char *src, int line, >>> + const char *fmt, ...) GCC_FMT_ATTR(4, 5); >>> =20 >> >>> +#define error_setg_errno(errp, os_error, fmt, ...) = \ >>> + error_setg_errno_internal((errp), __FILE__, __LINE__, (os_error)= , \ >>> + (fmt), ## __VA_ARGS__) >> >> Nit - why the difference in \ alignment? >=20 > I'm dense today... difference between where and where? one space after error_setg(), aligned to far right after error_setg_errno= (). >=20 >> Nit - as used here, 'errp', 'fmt', and 'os_error' can be used >> unambiguously; you don't need '(errp)' given the context of a >> parenthesized comma-separated list (even if someone DID want to unusua= l >> by passing in '(a,b)' with a comma operator for their 'errp' argument,= >> they'd have to supply the () because of the semantics of making the >> macro call). >=20 > I put parenthesis around macro parameters in the expansion pretty much > unthinkingly, because thought is expensive :) Of course, it doesn't hurt semantically to leave them in, and if you value the lower maintenance burden of less thinking, then the extra typing is not something I will reject :) --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --B22MijAq92KUU05cQQCcqCosEtjXQWfm1 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/ iQEcBAEBCAAGBQJVr6TxAAoJEKeha0olJ0NqCSAH/3eNTOVBwwfZR50/W1hcVG7n Tlzv21rvOQnQMsuWwN9rZk0gRhgSGEfZZXIGkzHwdHQRd3ek2W2uv9MU7BWoKjDE MmdyUm3hqXm+L7sBQjkArLpEENQQTPv43VUbB0s6r5tgC5X6oZJcUXUebDPBz245 HwY4rs0Adn5eZgITsU1oG15sO2l3xSbtRtdyS+Wx57Dzp+KIkWSefsFSja58hbnV dUQBz7+NtyzMJUutxxVgpu6Avuyn6SrWUCutqhfVIr9nYQ651+eWVfGKYDbheefw QO5aFeuhrZ/ho8OiXXAjkzCi3MugYLyZys6k27KY2SRpY5xG7fJAtPIaavhE8kk= =9qjv -----END PGP SIGNATURE----- --B22MijAq92KUU05cQQCcqCosEtjXQWfm1--