[Spice-devel] [PATCH spice-gtk 2/2] spice-channel: Use unsigned for num_caps

Christophe Fergeau cfergeau at redhat.com
Tue Nov 20 16:44:35 UTC 2018


Acked-by: Christophe Fergeau <cfergeau at redhat.com>

On Tue, Nov 20, 2018 at 01:25:45PM +0000, Frediano Ziglio wrote:
> Is just a sum of 2 unsigned numbers
> 
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  src/spice-channel.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/src/spice-channel.c b/src/spice-channel.c
> index dc3e2950..1b3578cd 100644
> --- a/src/spice-channel.c
> +++ b/src/spice-channel.c
> @@ -1896,7 +1896,8 @@ static void store_caps(const uint8_t *caps_src, uint32_t ncaps,
>  static gboolean spice_channel_recv_link_msg(SpiceChannel *channel)
>  {
>      SpiceChannelPrivate *c;
> -    int rc, num_caps;
> +    int rc;
> +    uint32_t num_caps;
>      uint32_t num_channel_caps, num_common_caps;
>      uint8_t *caps_src;
>      SpiceChannelEvent event = SPICE_CHANNEL_ERROR_LINK;
> @@ -1931,7 +1932,7 @@ static gboolean spice_channel_recv_link_msg(SpiceChannel *channel)
>      num_common_caps = GUINT32_FROM_LE(c->peer_msg->num_common_caps);
>  
>      num_caps = num_channel_caps + num_common_caps;
> -    CHANNEL_DEBUG(channel, "%s: %d caps", __FUNCTION__, num_caps);
> +    CHANNEL_DEBUG(channel, "%s: %u caps", __FUNCTION__, num_caps);
>  
>      /* see original spice/client code: */
>      /* g_return_if_fail(c->peer_msg + c->peer_msg->caps_offset * sizeof(uint32_t) > c->peer_msg + c->peer_hdr.size); */
> -- 
> 2.17.2
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20181120/a5b12f7c/attachment.sig>


More information about the Spice-devel mailing list