[Spice-devel] [PATCH] spice_server_char_device_add_interface: remove local 'reds' variable

Jonathon Jongsma jjongsma at redhat.com
Tue Apr 19 20:16:36 UTC 2016


Sorry, ignore this patch. It was intended to be squashed into "[PATCH 05/16] Use
weak gobject ref instead of reds_on_char_device_state_destroy"


On Tue, 2016-04-19 at 15:08 -0500, Jonathon Jongsma wrote:
> The local 'reds' variable shadows the 'reds' function argument and it is
> the exact same instance.
> ---
>  server/reds.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/server/reds.c b/server/reds.c
> index 60d8903..327711d 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -3238,11 +3238,8 @@ static int
> spice_server_char_device_add_interface(SpiceServer *reds,
>      }
>  
>      if (dev_state) {
> -        RedsState *reds;
> -
>          spice_assert(char_device->st);
>  
> -        g_object_get(G_OBJECT(dev_state), "spice-server", &reds, NULL);
>          g_object_weak_ref(G_OBJECT(dev_state),
>                            (GWeakNotify)reds_on_char_device_state_destroy,
>                            reds);


More information about the Spice-devel mailing list