From 6ed09e37722f601661fff42f80279a41773c574e Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 11 Oct 2013 12:10:45 +0100 Subject: 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 Acked-by: Ian Campbell --- tools/libxl/libxl_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/libxl/libxl_internal.h') diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 4e1505503c..165dc00287 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -829,7 +829,7 @@ _hidden void libxl__poller_dispose(libxl__poller *p); * away again afterwards. _get can fail, returning NULL. * ctx must be locked. */ _hidden libxl__poller *libxl__poller_get(libxl_ctx *ctx); -_hidden void libxl__poller_put(libxl_ctx *ctx, libxl__poller *p); +_hidden void libxl__poller_put(libxl_ctx*, libxl__poller *p /* may be NULL */); /* Notifies whoever is polling using p that they should wake up. * ctx must be locked. */ -- cgit v1.2.3