From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH 27/29] xenctx: correct error check when opening libxc Date: Wed, 30 Oct 2013 12:48:09 +0000 Message-ID: <52710009.8080304@eu.citrix.com> References: <1383119525-26033-1-git-send-email-mattjd@gmail.com> <1383119525-26033-28-git-send-email-mattjd@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1383119525-26033-28-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: Matthew Daley , xen-devel@lists.xen.org Cc: Ian Jackson , Ian Campbell , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On 30/10/13 07:52, Matthew Daley wrote: > Coverity-ID: 1054979 > Coverity-ID: 1055238 > Signed-off-by: Matthew Daley Reviewed-by: George Dunlap > --- > tools/xentrace/xenctx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c > index a86d512..c4b7912 100644 > --- a/tools/xentrace/xenctx.c > +++ b/tools/xentrace/xenctx.c > @@ -897,7 +897,7 @@ int main(int argc, char **argv) > read_symbol_table(symbol_table); > > xenctx.xc_handle = xc_interface_open(0,0,0); /* for accessing control interface */ > - if (xenctx.xc_handle < 0) { > + if (xenctx.xc_handle == NULL) { > perror("xc_interface_open"); > exit(-1); > }