Re: [spice-gtk v3 4/6] spice_channel_read_wire: move variables to internal scope

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

 



Acked-by: Christophe Fergeau <cfergeau@xxxxxxxxxx>

On Tue, Feb 28, 2017 at 12:21:49PM +0100, Victor Toso wrote:
> From: Victor Toso <me@xxxxxxxxxxxxxx>
> 
> And avoid single line if plus comment
> 
> Signed-off-by: Victor Toso <victortoso@xxxxxxxxxx>
> ---
>  src/spice-channel.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/src/spice-channel.c b/src/spice-channel.c
> index f2d1b8a..c2e8a01 100644
> --- a/src/spice-channel.c
> +++ b/src/spice-channel.c
> @@ -1048,12 +1048,15 @@ static int spice_channel_read_wire_nonblocking(SpiceChannel *channel,
>  static int spice_channel_read_wire(SpiceChannel *channel, void *data, size_t len)
>  {
>      SpiceChannelPrivate *c = channel->priv;
> -    GIOCondition cond;
> -    gssize ret;
>  
>      while (TRUE) {
> +        gssize ret;
> +        GIOCondition cond;
>  
> -        if (c->has_error) return 0; /* has_error is set by disconnect(), return no error */
> +        if (c->has_error) {
> +            /* has_error is set by disconnect(), return no error */
> +            return 0;
> +        }
>  
>          ret = spice_channel_read_wire_nonblocking(channel, data, len, &cond);
>  
> -- 
> 2.9.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/spice-devel

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]