[Spice-devel] [PATCH spice-gtk 4/4] Change uint32_t to int32_t

Frediano Ziglio fziglio at redhat.com
Mon May 23 13:14:44 UTC 2016


> 
> ---
>  src/channel-usbredir.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/channel-usbredir.c b/src/channel-usbredir.c
> index ddd0d1b..a6cbfe0 100644
> --- a/src/channel-usbredir.c
> +++ b/src/channel-usbredir.c
> @@ -796,7 +796,7 @@ static void spice_usbredir_channel_up(SpiceChannel *c)
>  static int try_handle_compressed_msg(SpiceMsgCompressedData
>  *compressed_data_msg,
>                                       uint8_t **buf,
>                                       int *size) {
> -    uint32_t decompressed_size = 0;
> +    int32_t decompressed_size = 0;
>      char *decompressed = NULL;
>  
>      if (compressed_data_msg->uncompressed_size == 0) {

I suppose this change is done as LZ4_decompress_safe returns int
indicating errors with <0.
I think than that int (the same type as LZ4_decompress_safe
returns) would be better and this patch should be squashed in
1/4.

Frediano.


More information about the Spice-devel mailing list