[Spice-devel] [spice-gtk 2/2] spice_channel_coroutine: fix function exit in error path
Marc-André Lureau
marcandre.lureau at gmail.com
Mon Jun 11 02:23:56 PDT 2012
ack
On Mon, Jun 11, 2012 at 11:17 AM, Christophe Fergeau
<cfergeau at redhat.com> 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 at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
--
Marc-André Lureau
More information about the Spice-devel
mailing list