From 07fa854a43bfb52fb4abfe7865ef1fb0467bdba7 Mon Sep 17 00:00:00 2001 From: Matthew Daley Date: Wed, 18 Sep 2013 15:37:55 +1200 Subject: 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 --- tools/xenstore/xenstored_domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3