Received: from eggs.gnu.org ([2001:4830:134:3::10]:48628) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIEa2-0002W0-FV for qemu-devel@nongnu.org; Thu, 23 Jul 2015 07:22:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZIEZy-0006HQ-DI for qemu-devel@nongnu.org; Thu, 23 Jul 2015 07:22:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37565) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIEZy-0006HE-8I for qemu-devel@nongnu.org; Thu, 23 Jul 2015 07:22:22 -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 AD81F3798D7 for ; Thu, 23 Jul 2015 11:22:21 +0000 (UTC) From: Markus Armbruster 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> <55AFA4F1.3090800@redhat.com> Date: Thu, 23 Jul 2015 13:22:19 +0200 In-Reply-To: <55AFA4F1.3090800@redhat.com> (Eric Blake's message of "Wed, 22 Jul 2015 08:13:05 -0600") Message-ID: <87a8undspg.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain 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: Eric Blake Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, dgilbert@redhat.com, mst@redhat.com Eric Blake writes: > On 07/22/2015 07:54 AM, Markus Armbruster wrote: > >>> >>>> +#define error_setg(errp, fmt, ...) \ >>>> + error_setg_internal((errp), __FILE__, __LINE__, (fmt), ## __VA_ARGS__) >>>> +void error_setg_internal(Error **errp, const char *src, int line, >>>> + const char *fmt, ...) GCC_FMT_ATTR(4, 5); >>>> >>> >>>> +#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? >> >> I'm dense today... difference between where and where? > > one space after error_setg(), aligned to far right after error_setg_errno(). Normalized. >>> 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 unusual >>> 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). >> >> 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 :) Thanks!