| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 19/28] xenstored: fix faulty check for bad handle in domain_init
 Coverity-ID: 1054975
Coverity-ID: 1055196
Signed-off-by: Matthew Daley <mattjd@xxxxxxxxx>
---
 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 bf83d58..f24bd6b 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);
-- 
1.7.10.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
 
  | 
  
![]()  | 
            
         Lists.xenproject.org is hosted with RackSpace, monitoring our  |