diff options
author | Reinhard Tartler <siretart@tauware.de> | 2011-10-10 17:46:43 +0200 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2011-10-10 17:46:43 +0200 |
commit | 3d1c57d5ef429e51ab7a626540c30b81e74a8f17 (patch) | |
tree | 2589846dd73cb0a86156fc5f2575ea2373431a57 /nx-X11/programs/Xserver/Xi/chgkmap.c | |
parent | 844a4094f098684dd1da5bc11e73479fb61373a3 (diff) | |
download | nx-libs-3d1c57d5ef429e51ab7a626540c30b81e74a8f17.tar.gz nx-libs-3d1c57d5ef429e51ab7a626540c30b81e74a8f17.tar.bz2 nx-libs-3d1c57d5ef429e51ab7a626540c30b81e74a8f17.zip |
Imported nx-X11-3.1.0-4.tar.gznx-X11/3.1.0-4
Summary: Imported nx-X11-3.1.0-4.tar.gz
Keywords:
Imported nx-X11-3.1.0-4.tar.gz
into Git repository
Diffstat (limited to 'nx-X11/programs/Xserver/Xi/chgkmap.c')
-rw-r--r-- | nx-X11/programs/Xserver/Xi/chgkmap.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/nx-X11/programs/Xserver/Xi/chgkmap.c b/nx-X11/programs/Xserver/Xi/chgkmap.c index 6b2a15aa2..3df376d9a 100644 --- a/nx-X11/programs/Xserver/Xi/chgkmap.c +++ b/nx-X11/programs/Xserver/Xi/chgkmap.c @@ -83,19 +83,14 @@ SProcXChangeDeviceKeyMapping(client) register ClientPtr client; { register char n; - register long *p; - register int i, count; + unsigned int count; REQUEST(xChangeDeviceKeyMappingReq); swaps(&stuff->length, n); REQUEST_AT_LEAST_SIZE(xChangeDeviceKeyMappingReq); - p = (long *) &stuff[1]; count = stuff->keyCodes * stuff->keySymsPerKeyCode; - for (i = 0; i < count; i++) - { - swapl(p, n); - p++; - } + REQUEST_FIXED_SIZE(xChangeDeviceKeyMappingReq, count * sizeof(CARD32)); + SwapLongs((CARD32 *) (&stuff[1]), count); return(ProcXChangeDeviceKeyMapping(client)); } @@ -112,10 +107,14 @@ ProcXChangeDeviceKeyMapping(client) int ret; unsigned len; DeviceIntPtr dev; + unsigned int count; REQUEST(xChangeDeviceKeyMappingReq); REQUEST_AT_LEAST_SIZE(xChangeDeviceKeyMappingReq); + count = stuff->keyCodes * stuff->keySymsPerKeyCode; + REQUEST_FIXED_SIZE(xChangeDeviceKeyMappingReq, count * sizeof(CARD32)); + dev = LookupDeviceIntRec (stuff->deviceid); if (dev == NULL) { |