[Spice-devel] [PATCH spice-server 11/12] Move monitors_config_ref inside red_monitors_config_item_new

Jonathon Jongsma jjongsma at redhat.com
Wed Oct 19 21:23:27 UTC 2016


On Tue, 2016-10-18 at 10:09 +0100, Frediano Ziglio wrote:
> Make move symmetric red_monitors_config_item_new and
> red_monitors_config_item_free.


This sentence is a little bit confusing. Perhaps:

"This makes red_monitors_config_item_new() and
red_monitors_config_item_free() symmetric"?

Acked-by: Jonathon Jongsma <jjongsma at redhat.com>



> 
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  server/dcc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/server/dcc.c b/server/dcc.c
> index 9bd1c0a..82a9f49 100644
> --- a/server/dcc.c
> +++ b/server/dcc.c
> @@ -657,7 +657,7 @@ static RedMonitorsConfigItem
> *red_monitors_config_item_new(RedChannel* channel,
>      RedMonitorsConfigItem *mci;
>  
>      mci = spice_new(RedMonitorsConfigItem, 1);
> -    mci->monitors_config = monitors_config;
> +    mci->monitors_config = monitors_config_ref(monitors_config);
>  
>      red_pipe_item_init_full(&mci->pipe_item,
> RED_PIPE_ITEM_TYPE_MONITORS_CONFIG,
>                              red_monitors_config_item_free);
> @@ -681,7 +681,7 @@ void
> dcc_push_monitors_config(DisplayChannelClient *dcc)
>      }
>  
>      mci =
> red_monitors_config_item_new(red_channel_client_get_channel(RED_CHANN
> EL_CLIENT(dcc)),
> -                                       monitors_config_ref(dc->priv-
> >monitors_config));
> +                                       monitors_config);
>      red_channel_client_pipe_add(RED_CHANNEL_CLIENT(dcc), &mci-
> >pipe_item);
>      red_channel_client_push(RED_CHANNEL_CLIENT(dcc));
>  }


More information about the Spice-devel mailing list