[PATCH] Xi: Use correct destination when swapping barrier events

Jasper St. Pierre jstpierre at mecheye.net
Tue Apr 9 17:04:02 PDT 2013


Whoops.

Reviewed-by: Jasper St. Pierre <jstpierre at mecheye.net>


On Tue, Apr 9, 2013 at 7:23 PM, Keith Packard <keithp at keithp.com> wrote:

> Write the swapped values to the destination rather than the source.
>
> Signed-off-by: Keith Packard <keithp at keithp.com>
> ---
>  Xi/extinit.c |   36 ++++++++++++++++++------------------
>  1 file changed, 18 insertions(+), 18 deletions(-)
>
> diff --git a/Xi/extinit.c b/Xi/extinit.c
> index 619d0e4..02fffe5 100644
> --- a/Xi/extinit.c
> +++ b/Xi/extinit.c
> @@ -848,24 +848,24 @@ SBarrierEvent(xXIBarrierEvent * from,
>
>      *to = *from;
>
> -    swaps(&from->sequenceNumber);
> -    swapl(&from->length);
> -    swaps(&from->evtype);
> -    swapl(&from->time);
> -    swaps(&from->deviceid);
> -    swaps(&from->sourceid);
> -    swapl(&from->event);
> -    swapl(&from->root);
> -    swapl(&from->root_x);
> -    swapl(&from->root_y);
> -
> -    swapl(&from->dx.integral);
> -    swapl(&from->dx.frac);
> -    swapl(&from->dy.integral);
> -    swapl(&from->dy.frac);
> -    swapl(&from->dtime);
> -    swapl(&from->barrier);
> -    swapl(&from->eventid);
> +    swaps(&to->sequenceNumber);
> +    swapl(&to->length);
> +    swaps(&to->evtype);
> +    swapl(&to->time);
> +    swaps(&to->deviceid);
> +    swaps(&to->sourceid);
> +    swapl(&to->event);
> +    swapl(&to->root);
> +    swapl(&to->root_x);
> +    swapl(&to->root_y);
> +
> +    swapl(&to->dx.integral);
> +    swapl(&to->dx.frac);
> +    swapl(&to->dy.integral);
> +    swapl(&to->dy.frac);
> +    swapl(&to->dtime);
> +    swapl(&to->barrier);
> +    swapl(&to->eventid);
>  }
>
>  /** Event swapping function for XI2 events. */
> --
> 1.7.10.4
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
>



-- 
  Jasper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20130409/92d6949e/attachment.html>


More information about the xorg-devel mailing list