[Spice-devel] [PATCH spice-gtk 05/16] channel-main: Drop bogus xfer_id check from file_xfer_send_start_msg_async

Christophe Fergeau cfergeau at redhat.com
Mon Apr 8 09:22:46 PDT 2013


ACK

On Fri, Mar 29, 2013 at 12:40:17PM +0100, Hans de Goede wrote:
> xfer_id > UINT32_MAX is never true since xfer_id is an uint32_t, and
> thus explicit wrapping is not necessary since it will wrap every
> UINT32_MAX + 1 itereations anyways.
> 
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> ---
>  gtk/channel-main.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/gtk/channel-main.c b/gtk/channel-main.c
> index 5d18366..4e766d3 100644
> --- a/gtk/channel-main.c
> +++ b/gtk/channel-main.c
> @@ -2668,8 +2668,6 @@ static void file_xfer_send_start_msg_async(SpiceMainChannel *channel,
>      SpiceFileXferTask *task;
>      static uint32_t xfer_id;    /* Used to identify task id */
>  
> -    xfer_id = (xfer_id > UINT32_MAX) ? 0 : xfer_id;
> -
>      task = spice_malloc0(sizeof(SpiceFileXferTask));
>      task->id = ++xfer_id;
>      task->channel = channel;
> -- 
> 1.8.1.4
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20130408/a81d568c/attachment.pgp>


More information about the Spice-devel mailing list