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

Re: [Xen-devel] [RFC] libxl hotplug / unplug emulated devices



Wei Liu writes ("Re: [RFC] libxl hotplug / unplug emulated devices"):
> On Fri, May 20, 2016 at 06:58:40PM +0100, Ian Jackson wrote:
> > Although I have a style nit:
> > 
> > >              if (libxl__device_model_version_running(gc, domid) ==
> > > -                LIBXL_DEVICE_MODEL_VERSION_NONE)
> > > +                LIBXL_DEVICE_MODEL_VERSION_NONE || hotplug)
> > >                  nic->nictype = LIBXL_NIC_TYPE_VIF;
> > 
> > This is rather odd formatting.  It makes it look like
> >    if (version = (NONE || hotplug)) { ...
> 
> Perhaps you mean
>      if ((version == NONE) || hotplug)
> ?

That's what you meant, and the compiler knows you meant (because of
the relative precedence of == and ||).

My point is that the formatting is misleading.

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®.