[Spice-devel] [PATCH 08/23] simplify release_item_after_push
Jonathon Jongsma
jjongsma at redhat.com
Tue May 17 19:59:32 UTC 2016
Acked-by: Jonathon Jongsma <jjongsma at redhat.com>
On Mon, 2016-05-16 at 14:31 +0100, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> server/dcc.c | 17 +----------------
> 1 file changed, 1 insertion(+), 16 deletions(-)
>
> diff --git a/server/dcc.c b/server/dcc.c
> index 286514c..20ba6ee 100644
> --- a/server/dcc.c
> +++ b/server/dcc.c
> @@ -1610,22 +1610,7 @@ int dcc_handle_migrate_data(DisplayChannelClient *dcc,
> uint32_t size, void *mess
>
> static void release_item_after_push(RedPipeItem *item)
> {
> - switch (item->type) {
> - case RED_PIPE_ITEM_TYPE_DRAW:
> - case RED_PIPE_ITEM_TYPE_IMAGE:
> - case RED_PIPE_ITEM_TYPE_STREAM_CLIP:
> - case RED_PIPE_ITEM_TYPE_MONITORS_CONFIG:
> - case RED_PIPE_ITEM_TYPE_UPGRADE:
> - red_pipe_item_unref(item);
> - break;
> - case RED_PIPE_ITEM_TYPE_GL_SCANOUT:
> - case RED_PIPE_ITEM_TYPE_GL_DRAW:
> - case RED_PIPE_ITEM_TYPE_VERB:
> - free(item);
> - break;
> - default:
> - spice_critical("invalid item type");
> - }
> + red_pipe_item_unref(item);
> }
>
> // TODO: share code between before/after_push since most of the items need
> the same
More information about the Spice-devel
mailing list