Re: [spice-gtk 2/2] spice_channel_coroutine: fix function exit in error path

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

 



ack

On Mon, Jun 11, 2012 at 11:17 AM, Christophe Fergeau
<cfergeau@xxxxxxxxxx> wrote:
> spice_channel_coroutine returns a void *, but one of its error path
> is doing 'return FALSE'. This commit replaces this return with a
> 'goto cleanup' since this is what is done in the other error paths.
> ---
>  gtk/spice-channel.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
> index fd63ca0..851fc23 100644
> --- a/gtk/spice-channel.c
> +++ b/gtk/spice-channel.c
> @@ -2107,7 +2107,7 @@ static void *spice_channel_coroutine(void *data)
>         if (!(c->sock = g_socket_new_from_fd(c->fd, NULL))) {
>                 SPICE_DEBUG("Failed to open socket from fd %d", c->fd);
>                 emit_main_context(channel, SPICE_CHANNEL_EVENT, SPICE_CHANNEL_ERROR_CONNECT);
> -                return FALSE;
> +                goto cleanup;
>         }
>
>         g_socket_set_blocking(c->sock, FALSE);
> --
> 1.7.10.2
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/spice-devel



-- 
Marc-André Lureau
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://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]