From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Daley Subject: [PATCH 19/28] xenstored: fix faulty check for bad handle in domain_init Date: Wed, 18 Sep 2013 15:37:55 +1200 Message-ID: <1379475484-25993-20-git-send-email-mattjd@gmail.com> References: <1379475484-25993-1-git-send-email-mattjd@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1379475484-25993-1-git-send-email-mattjd@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Matthew Daley , Ian Jackson , Ian Campbell , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org Coverity-ID: 1054975 Coverity-ID: 1055196 Signed-off-by: Matthew Daley --- 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