summaryrefslogtreecommitdiff
path: root/Xi/setbmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'Xi/setbmap.c')
-rw-r--r--Xi/setbmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Xi/setbmap.c b/Xi/setbmap.c
index e7b8d4ac0..37c40e408 100644
--- a/Xi/setbmap.c
+++ b/Xi/setbmap.c
@@ -94,8 +94,8 @@ ProcXSetDeviceButtonMapping(ClientPtr client)
REQUEST(xSetDeviceButtonMappingReq);
REQUEST_AT_LEAST_SIZE(xSetDeviceButtonMappingReq);
- if (stuff->length != (sizeof(xSetDeviceButtonMappingReq) +
- stuff->map_length + 3) >> 2)
+ if (stuff->length !=
+ bytes_to_int32(sizeof(xSetDeviceButtonMappingReq) + stuff->map_length))
return BadLength;
ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess);