From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH 28/29] xentrace: don't try to close null libxc handle in disable_tbufs Date: Wed, 30 Oct 2013 12:47:49 +0000 Message-ID: <5270FFF5.5090305@eu.citrix.com> References: <1383119525-26033-1-git-send-email-mattjd@gmail.com> <1383119525-26033-29-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-29-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: > While at it, simplify the function. > > Coverity-ID: 1055316 > Signed-off-by: Matthew Daley Reviewed-by: George Dunlap > --- > tools/xentrace/xentrace.c | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/tools/xentrace/xentrace.c b/tools/xentrace/xentrace.c > index 622bac8..504763d 100644 > --- a/tools/xentrace/xentrace.c > +++ b/tools/xentrace/xentrace.c > @@ -425,22 +425,18 @@ fail: > static void disable_tbufs(void) > { > xc_interface *xc_handle = xc_interface_open(0,0,0); > - int ret; > > if ( !xc_handle ) > { > perror("Couldn't open xc handle to disable tbufs."); > - goto out; > + return; > } > > - ret = xc_tbuf_disable(xc_handle); > - > - if ( ret != 0 ) > + if ( xc_tbuf_disable(xc_handle) != 0 ) > { > perror("Couldn't disable trace buffers"); > } > > -out: > xc_interface_close(xc_handle); > } >