[virt-tools-list] [virt-viewer] spice: Remove unneeded braces

Christophe Fergeau cfergeau at redhat.com
Fri Feb 17 12:36:23 UTC 2017


Two statements in virt_viewer_session_spice_main_channel_event() are
wrapped in a { } block, but this is unneeded.

Signed-off-by: Christophe Fergeau <cfergeau at redhat.com>
---
 src/virt-viewer-session-spice.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/virt-viewer-session-spice.c b/src/virt-viewer-session-spice.c
index 9b52ec0..5f326aa 100644
--- a/src/virt-viewer-session-spice.c
+++ b/src/virt-viewer-session-spice.c
@@ -694,12 +694,10 @@ virt_viewer_session_spice_main_channel_event(SpiceChannel *channel,
         gchar *host = NULL;
         g_debug("main channel: auth failure (wrong username/password?)");
 
-        {
-            error = spice_channel_get_error(channel);
-            username_required = g_error_matches(error,
-                                                SPICE_CLIENT_ERROR,
-                                                SPICE_CLIENT_ERROR_AUTH_NEEDS_PASSWORD_AND_USERNAME);
-        }
+        error = spice_channel_get_error(channel);
+        username_required = g_error_matches(error,
+                                            SPICE_CLIENT_ERROR,
+                                            SPICE_CLIENT_ERROR_AUTH_NEEDS_PASSWORD_AND_USERNAME);
 
         if (self->priv->pass_try > 0)
             g_signal_emit_by_name(session, "session-auth-refused",
-- 
2.9.3




More information about the virt-tools-list mailing list