aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/Xi/grabdevb.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/Xi/grabdevb.c')
-rw-r--r--nx-X11/programs/Xserver/Xi/grabdevb.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/nx-X11/programs/Xserver/Xi/grabdevb.c b/nx-X11/programs/Xserver/Xi/grabdevb.c
index 84f061086..ad43c29a0 100644
--- a/nx-X11/programs/Xserver/Xi/grabdevb.c
+++ b/nx-X11/programs/Xserver/Xi/grabdevb.c
@@ -84,8 +84,6 @@ SProcXGrabDeviceButton(client)
register ClientPtr client;
{
register char n;
- register long *p;
- register int i;
REQUEST(xGrabDeviceButtonReq);
swaps(&stuff->length, n);
@@ -93,12 +91,9 @@ SProcXGrabDeviceButton(client)
swapl(&stuff->grabWindow, n);
swaps(&stuff->modifiers, n);
swaps(&stuff->event_count, n);
- p = (long *) &stuff[1];
- for (i=0; i<stuff->event_count; i++)
- {
- swapl(p, n);
- p++;
- }
+ REQUEST_FIXED_SIZE(xGrabDeviceButtonReq,
+ stuff->event_count * sizeof(CARD32));
+ SwapLongs((CARD32 *) (&stuff[1]), stuff->event_count);
return(ProcXGrabDeviceButton(client));
}