summaryrefslogtreecommitdiff
path: root/Xi/sendexev.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-07-03 13:57:14 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-07-14 10:05:53 +1000
commit7dd415aa6a3959f15276741db168ba264948ecfe (patch)
tree84e5b697f073722936dc82f138255f71ef2153d4 /Xi/sendexev.c
parent912402fd71144bcee255141efe12a78abad39240 (diff)
Xi: use byte-counting macros instead of manual calculation.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'Xi/sendexev.c')
-rw-r--r--Xi/sendexev.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Xi/sendexev.c b/Xi/sendexev.c
index 63b45ee49..8629dd202 100644
--- a/Xi/sendexev.c
+++ b/Xi/sendexev.c
@@ -89,8 +89,8 @@ SProcXSendExtensionEvent(ClientPtr client)
swapl(&stuff->destination, n);
swaps(&stuff->count, n);
- if (stuff->length != (sizeof(xSendExtensionEventReq) >> 2) + stuff->count +
- (stuff->num_events * (sizeof(xEvent) >> 2)))
+ if (stuff->length != bytes_to_int32(sizeof(xSendExtensionEventReq)) + stuff->count +
+ bytes_to_int32(stuff->num_events * sizeof(xEvent)))
return BadLength;
eventP = (xEvent *) & stuff[1];
@@ -126,8 +126,8 @@ ProcXSendExtensionEvent(ClientPtr client)
REQUEST(xSendExtensionEventReq);
REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq);
- if (stuff->length != (sizeof(xSendExtensionEventReq) >> 2) + stuff->count +
- (stuff->num_events * (sizeof(xEvent) >> 2)))
+ if (stuff->length != bytes_to_int32(sizeof(xSendExtensionEventReq)) + stuff->count +
+ (stuff->num_events * bytes_to_int32(sizeof(xEvent))))
return BadLength;
ret = dixLookupDevice(&dev, stuff->deviceid, client, DixWriteAccess);