[Spice-devel] [PATCH 4/9] remove common_graphics_channel_new_client function

Jonathon Jongsma jjongsma at redhat.com
Fri Aug 5 20:43:21 UTC 2016


OK.

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



On Thu, 2016-08-04 at 16:17 -0500, Jonathon Jongsma wrote:
> From: Frediano Ziglio <fziglio at redhat.com>
> 
> The function was just calling another function with same parameters
> 
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  server/cursor-channel.c | 16 ++++++++--------
>  server/dcc.c            |  9 +++++----
>  server/red-worker.c     | 20 --------------------
>  server/red-worker.h     | 10 ----------
>  4 files changed, 13 insertions(+), 42 deletions(-)
> 
> diff --git a/server/cursor-channel.c b/server/cursor-channel.c
> index 2621c5f..ce1ea97 100644
> --- a/server/cursor-channel.c
> +++ b/server/cursor-channel.c
> @@ -387,14 +387,14 @@ static CursorChannelClient*
> cursor_channel_client_new(CursorChannel *cursor,
>      spice_return_val_if_fail(!num_caps || caps, NULL);
>  
>      CursorChannelClient *ccc =
> -        (CursorChannelClient*)common_graphics_channel_new_client(&cu
> rsor->common,
> -                                                                 siz
> eof(CursorChannelClient),
> -                                                                 cli
> ent, stream,
> -                                                                 FAL
> SE,
> -                                                                 com
> mon_caps,
> -                                                                 num
> _common_caps,
> -                                                                 cap
> s,
> -                                                                 num
> _caps);
> +        (CursorChannelClient*)red_channel_client_create(sizeof(Curso
> rChannelClient),
> +                                                        &cursor-
> >common.base,
> +                                                        client,
> stream,
> +                                                        FALSE,
> +                                                        num_common_c
> aps,
> +                                                        common_caps,
> +                                                        num_caps,
> +                                                        caps);
>      spice_return_val_if_fail(ccc != NULL, NULL);
>      cursor->common.during_target_migrate = mig_target;
>  
> diff --git a/server/dcc.c b/server/dcc.c
> index 81ae4ed..24d3d4b 100644
> --- a/server/dcc.c
> +++ b/server/dcc.c
> @@ -364,11 +364,12 @@ DisplayChannelClient *dcc_new(DisplayChannel
> *display,
>  {
>      DisplayChannelClient *dcc;
>  
> -    dcc = (DisplayChannelClient*)common_graphics_channel_new_client(
> -        COMMON_GRAPHICS_CHANNEL(display),
> sizeof(DisplayChannelClient),
> +    dcc = (DisplayChannelClient*)red_channel_client_create(
> +        sizeof(DisplayChannelClient),
> +        &COMMON_GRAPHICS_CHANNEL(display)->base,
>          client, stream, TRUE,
> -        common_caps, num_common_caps,
> -        caps, num_caps);
> +        num_common_caps, common_caps,
> +        num_caps, caps);
>      display->common.during_target_migrate = mig_target;
>      dcc->id = display->common.qxl->id;
>      spice_return_val_if_fail(dcc, NULL);
> diff --git a/server/red-worker.c b/server/red-worker.c
> index 8f9c8dd..9744131 100644
> --- a/server/red-worker.c
> +++ b/server/red-worker.c
> @@ -441,26 +441,6 @@ static int
> common_channel_config_socket(RedChannelClient *rcc)
>      return TRUE;
>  }
>  
> -CommonGraphicsChannelClient
> *common_graphics_channel_new_client(CommonGraphicsChannel *common,
> -                                                                int
> size,
> -                                                                RedC
> lient *client,
> -                                                                Reds
> Stream *stream,
> -                                                                int
> monitor_latency,
> -                                                                uint
> 32_t *common_caps,
> -                                                                int
> num_common_caps,
> -                                                                uint
> 32_t *caps,
> -                                                                int
> num_caps)
> -{
> -    RedChannelClient *rcc =
> -        red_channel_client_create(size, &common->base, client,
> stream, monitor_latency,
> -                                  num_common_caps, common_caps,
> num_caps, caps);
> -    if (!rcc) {
> -        return NULL;
> -    }
> -    return (CommonGraphicsChannelClient*)rcc;
> -}
> -
> -
>  CommonGraphicsChannel *red_worker_new_channel(RedWorker *worker, int
> size,
>                                                const char *name,
>                                                uint32_t channel_type,
> int migration_flags,
> diff --git a/server/red-worker.h b/server/red-worker.h
> index 318a004..31a6f3e 100644
> --- a/server/red-worker.h
> +++ b/server/red-worker.h
> @@ -100,14 +100,4 @@ CommonGraphicsChannel
> *red_worker_new_channel(RedWorker *worker, int size,
>                                                ChannelCbs
> *channel_cbs,
>                                                channel_handle_parsed_
> proc handle_parsed);
>  
> -CommonGraphicsChannelClient
> *common_graphics_channel_new_client(CommonGraphicsChannel *common,
> -                                                                int
> size,
> -                                                                RedC
> lient *client,
> -                                                                Reds
> Stream *stream,
> -                                                                int
> monitor_latency,
> -                                                                uint
> 32_t *common_caps,
> -                                                                int
> num_common_caps,
> -                                                                uint
> 32_t *caps,
> -                                                                int
> num_caps);
> -
>  #endif


More information about the Spice-devel mailing list