On Tue, Jul 17, 2018 at 07:57:54AM +0100, Frediano Ziglio wrote:
> No need to pass a generic pointer.
> 

This is also used as a callback:
    spice_g_signal_connect_object(d->session, "channel-new",
                                  G_CALLBACK(channel_new), display, 0);
and the 'expected' type for the last argument is a gpointer. Nothing
checks for it/should be impacted by this change though. I'd squash the
first patch into this one fwiw.

Acked-by: Christophe Fergeau <cferg...@redhat.com>

Christophe


> Signed-off-by: Frediano Ziglio <fzig...@redhat.com>
> ---
>  src/spice-widget.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/src/spice-widget.c b/src/spice-widget.c
> index c794350a..97893591 100644
> --- a/src/spice-widget.c
> +++ b/src/spice-widget.c
> @@ -111,8 +111,8 @@ static void update_mouse_grab(SpiceDisplay *display);
>  static void try_mouse_grab(SpiceDisplay *display);
>  static void try_mouse_ungrab(SpiceDisplay *display);
>  static void recalc_geometry(GtkWidget *widget);
> -static void channel_new(SpiceSession *s, SpiceChannel *channel, gpointer 
> data);
> -static void channel_destroy(SpiceSession *s, SpiceChannel *channel, gpointer 
> data);
> +static void channel_new(SpiceSession *s, SpiceChannel *channel, SpiceDisplay 
> *display);
> +static void channel_destroy(SpiceSession *s, SpiceChannel *channel, 
> SpiceDisplay *display);
>  static void cursor_invalidate(SpiceDisplay *display);
>  static void update_area(SpiceDisplay *display, gint x, gint y, gint width, 
> gint height);
>  static void release_keys(SpiceDisplay *display);
> @@ -2976,9 +2976,8 @@ static void gl_draw(SpiceDisplay *display,
>  }
>  #endif
>  
> -static void channel_new(SpiceSession *s, SpiceChannel *channel, gpointer 
> data)
> +static void channel_new(SpiceSession *s, SpiceChannel *channel, SpiceDisplay 
> *display)
>  {
> -    SpiceDisplay *display = data;
>      SpiceDisplayPrivate *d = display->priv;
>      int id;
>  
> @@ -3069,9 +3068,8 @@ static void channel_new(SpiceSession *s, SpiceChannel 
> *channel, gpointer data)
>      return;
>  }
>  
> -static void channel_destroy(SpiceSession *s, SpiceChannel *channel, gpointer 
> data)
> +static void channel_destroy(SpiceSession *s, SpiceChannel *channel, 
> SpiceDisplay *display)
>  {
> -    SpiceDisplay *display = data;
>      SpiceDisplayPrivate *d = display->priv;
>      int id;
>  
> -- 
> 2.17.1
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel

Attachment: signature.asc
Description: PGP signature

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

Reply via email to