[Spice-devel] [PATCH 08/16] misc cleanups

Jonathon Jongsma jjongsma at redhat.com
Fri Nov 27 08:31:08 PST 2015


On Thu, 2015-11-26 at 16:06 +0000, Frediano Ziglio wrote:
> From: Marc-André Lureau <marcandre.lureau at gmail.com>
> 
> ---
>  server/cursor-channel.c | 2 +-
>  server/dcc-send.c       | 4 +---
>  server/red_worker.c     | 4 ++--
>  server/red_worker.h     | 2 +-
>  4 files changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/server/cursor-channel.c b/server/cursor-channel.c
> index 9d72299..840ff30 100644
> --- a/server/cursor-channel.c
> +++ b/server/cursor-channel.c
> @@ -427,7 +427,7 @@ static void cursor_channel_release_item(RedChannelClient
> *rcc, PipeItem *item, i
>  CursorChannel* cursor_channel_new(RedWorker *worker)
>  {
>      CursorChannel *cursor_channel;
> -    RedChannel *channel = NULL;
> +    CommonChannel *channel = NULL;
>      ChannelCbs cbs = {
>          .on_disconnect =  cursor_channel_client_on_disconnect,
>          .send_item = cursor_channel_send_item,
> diff --git a/server/dcc-send.c b/server/dcc-send.c
> index 2340252..0404cef 100644
> --- a/server/dcc-send.c
> +++ b/server/dcc-send.c
> @@ -2017,9 +2017,7 @@ static void red_marshall_image(RedChannelClient *rcc,
> SpiceMarshaller *m, ImageI
>                                                  groupid);
>  #endif
>      } else if (comp_mode != SPICE_IMAGE_COMPRESSION_OFF) {
> -        comp_succeeded = dcc_compress_image_lz(dcc, &red_image, &bitmap,
> -                                               &comp_send_data,
> -                                               groupid);
> +            comp_succeeded = dcc_compress_image_lz(dcc, &red_image, &bitmap,
> &comp_send_data, groupid);

This hunk is unrelated and seems to use too much indentation? 


>      }
>  
>      surface_lossy_region = &dcc->surface_client_lossy_region[item
> ->surface_id];
> diff --git a/server/red_worker.c b/server/red_worker.c
> index 49a8dbc..77ad06b 100644
> --- a/server/red_worker.c
> +++ b/server/red_worker.c
> @@ -699,7 +699,7 @@ CommonChannelClient
> *common_channel_new_client(CommonChannel *common,
>  }
>  
>  
> -RedChannel *red_worker_new_channel(RedWorker *worker, int size,
> +CommonChannel *red_worker_new_channel(RedWorker *worker, int size,
>                                     const char *name,
>                                     uint32_t channel_type, int
> migration_flags,
>                                     ChannelCbs *channel_cbs,
> @@ -730,7 +730,7 @@ RedChannel *red_worker_new_channel(RedWorker *worker, int
> size,
>  
>      common = (CommonChannel *)channel;
>      common->worker = worker;
> -    return channel;
> +    return common;
>  }
>  
>  static void guest_set_client_capabilities(RedWorker *worker)
> diff --git a/server/red_worker.h b/server/red_worker.h
> index 1e2c550..57e3c0f 100644
> --- a/server/red_worker.h
> +++ b/server/red_worker.h
> @@ -103,7 +103,7 @@ RedMemSlotInfo* red_worker_get_memslot(RedWorker *worker);
>  void red_drawable_unref(RedWorker *worker, RedDrawable *red_drawable,
>                          uint32_t group_id);
>  
> -RedChannel *red_worker_new_channel(RedWorker *worker, int size,
> +CommonChannel *red_worker_new_channel(RedWorker *worker, int size,
>                                     const char *name,
>                                     uint32_t channel_type, int
> migration_flags,
>                                     ChannelCbs *channel_cbs,


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


More information about the Spice-devel mailing list