[virt-tools-list] [virt-viewer][PATCH 7/7 v3] virt-viewer: Make update_display() more readable
Christophe Fergeau
cfergeau at redhat.com
Fri Mar 27 09:53:00 UTC 2015
On Thu, Mar 26, 2015 at 11:27:00PM +0100, Fabiano Fidêncio wrote:
> ---
> 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;
I'd go as far as
if (virt_viewer_app_has_session(app))
return TRUE;
return virt_viewer_extract_connect_info(self, dom, error);
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20150327/ef144b02/attachment.sig>
More information about the virt-tools-list
mailing list