[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH V12 3/5] libxl: add pvusb API



On Tue, 2016-01-12 at 18:31 +0000, Ian Jackson wrote:
>Â
> > +static char *usb_interface_xenstore_encode(libxl__gc *gc, const char
> > *busid)
> > +{
> > +ÂÂÂÂchar *str = libxl__strdup(gc, busid);
> > +ÂÂÂÂint i, len = strlen(str);
> > +
> > +ÂÂÂÂfor (i = 0; i < len; i++) {
> > +ÂÂÂÂÂÂÂÂif (str[i] == '.')
> > +ÂÂÂÂÂÂÂÂÂÂÂÂstr[i] = '_';
> > +ÂÂÂÂÂÂÂÂif (str[i] == ':')
> > +ÂÂÂÂÂÂÂÂÂÂÂÂstr[i] = '@';
> 
> I know I'm late with this comment and it's trivial and my
> comaintainers may disagree, but I would find this
> 
> Â +ÂÂÂÂÂÂÂÂif (str[i] == '.') str[i] = '_';
> Â +ÂÂÂÂÂÂÂÂif (str[i] == ':') str[i] = '@';
> 
> clearer because the layout reflects the regular structure of the code.
> But please don't change this until another maintainer has commented
> and said whether they agree with me.ÂÂCertainly this is observation of
> mine does not block this patch.

I would lean towards the layout Ian suggests too.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.