From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: libxl, flexarray_append_pair usage Date: Fri, 1 May 2015 14:33:20 +0100 Message-ID: <1430487200.15640.30.camel@citrix.com> References: <20150424091600.GA11059@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150424091600.GA11059@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Olaf Hering Cc: Ian Jackson , Stefano Stabellini , Wei Liu , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Fri, 2015-04-24 at 11:16 +0200, Olaf Hering wrote: > On Fri, Apr 24, Olaf Hering wrote: > > > flexarray_append(back, "state"); > > - flexarray_append(back, GCSPRINTF("%d", 1)); > > + flexarray_append(back, GCSPRINTF("%d", XenbusStateInitialising)); > > Should all such code be converted to flexarray_append_pair? If you are touching the line anyway then I suppose that would be a good thing, although not mandatory. I don't think it is worth going through and proactively changing things. > To reduce line length a short macro should be added, like FLXAP or > FLXPAIR or something else. Not sure about this, the macro doesn't save very much and FLX is a bit opaque, I'd be inclined to just do normal wrapping for now. Ian.