[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] libxl: make libxl__poller_put tolerate p==NULL libxl_event_wait
On Sat, Oct 12, 2013 at 12:12 AM, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> wrote: > commit 9134bb273db4d55bec247d751b1de6e7876a7fe7 > Author: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> > Date: Fri Oct 11 12:10:45 2013 +0100 > > libxl: make libxl__poller_put tolerate p==NULL > > This is less fragile, and more in keeping with the usual style of > initialising everything to 0 and freeing things unconditionally. > > Correspondingly, remove the tests at the call sites. > > Apropos of c1f3f174. No overall functional change. > > Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> > > diff --git a/tools/libxl/libxl_event.c b/tools/libxl/libxl_event.c > index 6f033dd..a5c52bc 100644 > --- a/tools/libxl/libxl_event.c > +++ b/tools/libxl/libxl_event.c > @@ -1347,6 +1347,7 @@ libxl__poller *libxl__poller_get(libxl_ctx *ctx) > > void libxl__poller_put(libxl_ctx *ctx, libxl__poller *p) > { > + if (!p) return; So before I go and send more libxl patches, what's the story with single-line if statements like this? Is it acceptable in libxl (only?) after all? - Matthew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |