[Spice-devel] [PATCH] make RedDataChunk structure private inside red-parse-qxl.c

Pavel Grunt pgrunt at redhat.com
Tue Feb 16 12:50:12 UTC 2016


On Tue, 2016-02-16 at 11:32 +0000, Frediano Ziglio wrote:
> The structure is strictly used by the parser only, no reason to make
> it
> public.
> 
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Pavel Grunt <pgrunt at redhat.com>
> ---
>  server/red-parse-qxl.c | 8 ++++++++
>  server/red-parse-qxl.h | 8 --------
>  2 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c
> index 4d2cc72..18b7ea6 100644
> --- a/server/red-parse-qxl.c
> +++ b/server/red-parse-qxl.c
> @@ -47,6 +47,14 @@ G_STATIC_ASSERT(MAX_DATA_CHUNK <= G_MAXINT32);
>  
>  #define INVALID_SIZE ((size_t) -1)
>  
> +typedef struct RedDataChunk RedDataChunk;
> +struct RedDataChunk {
> +    uint32_t data_size;
> +    RedDataChunk *prev_chunk;
> +    RedDataChunk *next_chunk;
> +    uint8_t *data;
> +};
> +
>  #if 0
>  static void hexdump_qxl(RedMemSlotInfo *slots, int group_id,
>                          QXLPHYSICAL addr, uint8_t bytes)
> diff --git a/server/red-parse-qxl.h b/server/red-parse-qxl.h
> index b5f95e6..9c30572 100644
> --- a/server/red-parse-qxl.h
> +++ b/server/red-parse-qxl.h
> @@ -76,14 +76,6 @@ typedef struct RedMessage {
>      uint8_t *data;
>  } RedMessage;
>  
> -typedef struct RedDataChunk RedDataChunk;
> -struct RedDataChunk {
> -    uint32_t data_size;
> -    RedDataChunk *prev_chunk;
> -    RedDataChunk *next_chunk;
> -    uint8_t *data;
> -};
> -
>  typedef struct RedSurfaceCreate {
>      uint32_t format;
>      uint32_t width;


More information about the Spice-devel mailing list