[Spice-devel] [PATCH spice-server] dcc: Remove unused channel parameter

Snir Sheriber ssheribe at redhat.com
Sun Mar 11 08:04:03 UTC 2018


Hi,


On 03/08/2018 12:35 PM, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>   server/dcc.c | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/server/dcc.c b/server/dcc.c
> index d457989b..15b65978 100644
> --- a/server/dcc.c
> +++ b/server/dcc.c
> @@ -676,8 +676,7 @@ void dcc_push_monitors_config(DisplayChannelClient *dcc)
>       red_channel_client_pipe_add(RED_CHANNEL_CLIENT(dcc), &mci->pipe_item);
>   }
>   
> -static RedSurfaceDestroyItem *red_surface_destroy_item_new(RedChannel *channel,
> -                                                           uint32_t surface_id)
> +static RedSurfaceDestroyItem *red_surface_destroy_item_new(uint32_t surface_id)
>   {
>       RedSurfaceDestroyItem *destroy;
>   
> @@ -730,7 +729,6 @@ RedPipeItem *dcc_gl_draw_item_new(RedChannelClient *rcc, void *data, int num)
>   void dcc_destroy_surface(DisplayChannelClient *dcc, uint32_t surface_id)
>   {
>       DisplayChannel *display;
> -    RedChannel *channel;
>       RedSurfaceDestroyItem *destroy;
>   
>       if (!dcc) {
> @@ -738,7 +736,6 @@ void dcc_destroy_surface(DisplayChannelClient *dcc, uint32_t surface_id)
>       }
>   
>       display = DCC_TO_DC(dcc);
> -    channel = RED_CHANNEL(display);
>   
>       if (common_graphics_channel_get_during_target_migrate(COMMON_GRAPHICS_CHANNEL(display)) ||
>           !dcc->priv->surface_client_created[surface_id]) {
> @@ -746,7 +743,7 @@ void dcc_destroy_surface(DisplayChannelClient *dcc, uint32_t surface_id)
>       }
>   
>       dcc->priv->surface_client_created[surface_id] = FALSE;
> -    destroy = red_surface_destroy_item_new(channel, surface_id);
> +    destroy = red_surface_destroy_item_new(surface_id);
>       red_channel_client_pipe_add(RED_CHANNEL_CLIENT(dcc), &destroy->pipe_item);
>   }
>   


Isn't it some kind of convention for "OOP" in c?
Anyway i prefer it that way so i would ack if there is no objection.

Snir.


More information about the Spice-devel mailing list