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

Pavel Grunt pgrunt at redhat.com
Fri Feb 17 13:50:53 UTC 2017


Ack

On Fri, 2017-02-17 at 13:36 +0100, Christophe Fergeau wrote:
> 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",




More information about the virt-tools-list mailing list