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

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

 



---
 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

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux