From: Matthew Daley Date: Wed, 18 Sep 2013 03:37:55 +0000 (+1200) Subject: xenstored: fix faulty check for bad handle in domain_init X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~6279 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=07fa854a43bfb52fb4abfe7865ef1fb0467bdba7;p=xen.git xenstored: fix faulty check for bad handle in domain_init Coverity-ID: 1054975 Coverity-ID: 1055196 Signed-off-by: Matthew Daley Acked-by: Ian Campbell --- diff --git a/tools/xenstore/xenstored_domain.c b/tools/xenstore/xenstored_domain.c index bf83d5830b..f24bd6bd18 100644 --- a/tools/xenstore/xenstored_domain.c +++ b/tools/xenstore/xenstored_domain.c @@ -640,7 +640,7 @@ void domain_init(void) barf_perror("Failed to allocate domain gnttab handle"); *xcg_handle = xc_gnttab_open(NULL, 0); - if (*xcg_handle < 0) + if (*xcg_handle == NULL) xprintf("WARNING: Failed to open connection to gnttab\n"); else talloc_set_destructor(xcg_handle, close_xcg_handle);