[PATCH libXi] Use Data, not Data32 in XIPassiveGrabDevice

Jeremy Huddleston jeremyhu at apple.com
Thu Jun 2 09:38:01 PDT 2011


Looks right...

Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>

On Jun 1, 2011, at 11:35 PM, Peter Hutterer wrote:

> Data32 takes and iterates over an array of longs, thus skipping every 4
> bytes on LP64. Here we only have arrays of ints, use the normal Data macro
> instead.
> 
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
> tbh, I'm getting mighty confused by the Data/Data32 macros and I'm surprised
> this worked before...  maybe something else I'm missing here
> 
> src/XIPassiveGrab.c |    4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/XIPassiveGrab.c b/src/XIPassiveGrab.c
> index feef74b..34f1bf3 100644
> --- a/src/XIPassiveGrab.c
> +++ b/src/XIPassiveGrab.c
> @@ -67,9 +67,9 @@ _XIPassiveGrabDevice(Display* dpy, int deviceid, int grabtype, int detail,
> 
>     buff = calloc(4, req->mask_len);
>     memcpy(buff, mask->mask, mask->mask_len);
> -    Data32(dpy, buff, req->mask_len * 4);
> +    Data(dpy, buff, req->mask_len * 4);
>     for (i = 0; i < num_modifiers; i++)
> -        Data32(dpy, &modifiers_inout[i].modifiers, 4);
> +        Data(dpy, (char*)&modifiers_inout[i].modifiers, 4);
> 
>     free(buff);
> 
> -- 
> 1.7.5.1
> 
> _______________________________________________
> 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
> 



More information about the xorg-devel mailing list