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

Re: [Xen-devel] [PATCH] pci-attach: fix assertation



On Wed, 2015-09-16 at 14:39 +0100, Ian Jackson wrote:
> Ian Campbell writes ("Re: [PATCH] pci-attach: fix assertation"):
> > Ian, tools/libxl/libxl_internal.h says to initialised the transaction
> > to 0
> > rather than XBT_NULL explicitly -- I don't think there is a specific
> > reason
> > for that though?
> 
> It says:
> 
> /* Transaction functions, best used together.
>  * The caller should initialise *t to 0 (XBT_NULL) before calling start.
> 
> I think that amounts to a promise that XBT_NULL == 0.  Therefore the
> caller may (from a correctness pov) use either.

Agreed, I just wanted to be sure there wasn't some magic reason to avoid
XBT_NULL (other than, as you say, needless verbiage).

> It is important that initialisation with 0 is supported because then
> FILLZERO is known to DTRT.  (Note that, analogously, we are already
> assuming that FILLZERO generates null pointers.)

Right.

> I know that some people have strong views that writing NULL for null
> pointers, rather than 0, is better.  I think it is needless verbiage.
> A similar argument applies to XBT_NULL.  I think this is a bikeshed
> and am happy to let it be whatever colour it comes from the factory
> :-).

Ack.

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