summaryrefslogtreecommitdiff
path: root/x11/modular-xorg-server/patches/patch-ek
blob: e50f933a9a2b2612ca0b41804a6c159d814da4dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
$NetBSD: patch-ek,v 1.1 2008/02/25 15:39:16 joerg Exp $

--- Xi/grabdevb.c.orig	2006-06-06 19:13:52.000000000 +0200
+++ Xi/grabdevb.c
@@ -80,8 +80,6 @@ int
 SProcXGrabDeviceButton(register ClientPtr client)
 {
     register char n;
-    register long *p;
-    register int i;
 
     REQUEST(xGrabDeviceButtonReq);
     swaps(&stuff->length, n);
@@ -89,11 +87,9 @@ SProcXGrabDeviceButton(register ClientPt
     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));
 }