Xi: use byte-counting macros instead of manual calculation.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer
2009-07-03 13:57:14 +10:00
parent 912402fd71
commit 7dd415aa6a
28 changed files with 56 additions and 55 deletions

View File

@@ -96,8 +96,8 @@ ProcXSetDeviceModifierMapping(ClientPtr client)
REQUEST(xSetDeviceModifierMappingReq);
REQUEST_AT_LEAST_SIZE(xSetDeviceModifierMappingReq);
if (stuff->length != ((sizeof(xSetDeviceModifierMappingReq) >> 2) +
(stuff->numKeyPerModifier << 1)))
if (stuff->length != bytes_to_int32(sizeof(xSetDeviceModifierMappingReq)) +
(stuff->numKeyPerModifier << 1))
return BadLength;
rep.repType = X_Reply;