[virt-tools-list] [virt-viewer 8/8 v4] virt-viewer: Make update_display() more readable

Fabiano Fidêncio fidencio at redhat.com
Fri Mar 27 16:21:58 UTC 2015


---
 src/virt-viewer.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/virt-viewer.c b/src/virt-viewer.c
index e297757..2f047f0 100644
--- a/src/virt-viewer.c
+++ b/src/virt-viewer.c
@@ -522,12 +522,10 @@ virt_viewer_update_display(VirtViewer *self, virDomainPtr dom, GError **error)
 
     g_object_set(app, "guest-name", virDomainGetName(dom), NULL);
 
-    if (!virt_viewer_app_has_session(app)) {
-        if (!virt_viewer_extract_connect_info(self, dom, error))
-            return FALSE;
-    }
+    if (virt_viewer_app_has_session(app))
+        return TRUE;
 
-    return TRUE;
+    return virt_viewer_extract_connect_info(self, dom, error);
 }
 
 static gboolean
-- 
2.3.3




More information about the virt-tools-list mailing list