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

Re: [Xen-devel] [PATCH 10/20] libxl: Make libxl__zalloc et al tolerate a NULL gc



Ian Campbell writes ("Re: [Xen-devel] [PATCH 10/20] libxl: Make libxl__zalloc 
et al tolerate a NULL gc"):
> On Fri, 2012-03-16 at 16:26 +0000, Ian Jackson wrote:
> > Arrange that if we pass NULL as a gc, we simply don't register the
> > pointer.  This instantly gives us non-gc'ing but error-checking
> > versions of malloc, realloc, vasprintf, etc.
...
> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

Thanks.

> We could consider __attribute__((nonnull)) for the other helper
> functions in that section of libxl_internal.h.

The only function in that section which isn't declared as taking
gc_opt (ie which can't be passed NULL) is libxl__free_all, and it
seems unlikely anyone would mistakenly pass 0 to it (esp. since it has
few callers).

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