[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/3] libxl/remus: Move the assert before the info is used.
Ian Campbell writes ("Re: [PATCH 2/3] libxl/remus: Move the assert before the info is used."): > On Mon, 2016-01-25 at 16:06 -0500, Konrad Rzeszutek Wilk wrote: > > The assert(info) is after quite a lot of manipulations > > on 'info' - which makes the assert pointless because if > > info was NULL it would have crashed earlier. > > > > Move it earlier so that it guards before we try using > > the 'info' structure. > > That assert (wherever it is placed) is rather aggressive for an application > provided argument. ERROR_INVALID would be more normal I think. I think the assert should simply be removed. We don't assert() other pointer parameters for non-NULL-ness. Certainly turning null pointer bugs into ERROR_INVALID is very unfriendly. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |