[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
On Tue, 2012-03-20 at 16:26 +0000, Ian Jackson wrote: > 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). Oh, right, I was looking at libxl__xs_kvs_of_flexarray etc but that's actually the next section I guess. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |