[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] xentrace: don't try to close null libxc handle in disable_tbufs



commit 7343db9a771e0026c1f6acc78521025c589ee7d3
Author:     Matthew Daley <mattjd@xxxxxxxxx>
AuthorDate: Wed Oct 30 20:52:04 2013 +1300
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Thu Oct 31 21:55:53 2013 +0000

    xentrace: don't try to close null libxc handle in disable_tbufs
    
    While at it, simplify the function.
    
    Coverity-ID: 1055316
    Signed-off-by: Matthew Daley <mattjd@xxxxxxxxx>
    Reviewed-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 tools/xentrace/xentrace.c |    8 ++------
 1 files 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);
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.