[virt-tools-list] [virt-viewer][PATCH 7/7 v3] virt-viewer: Make update_display() more readable

Fabiano Fidêncio fidencio at redhat.com
Thu Mar 26 22:27:00 UTC 2015


---
 src/virt-viewer.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/virt-viewer.c b/src/virt-viewer.c
index e94b897..123c7d2 100644
--- a/src/virt-viewer.c
+++ b/src/virt-viewer.c
@@ -526,10 +526,8 @@ 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 virt_viewer_extract_connect_info(self, dom, error);
 
     return TRUE;
 }
-- 
2.3.3




More information about the virt-tools-list mailing list