diff options
author | Kim Woelders <kim@woelders.dk> | 2008-09-22 08:37:29 +0930 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@redhat.com> | 2008-09-22 08:37:29 +0930 |
commit | 8c46505d7d91e0644b19cccc4b342fceb6f86cab (patch) | |
tree | 45f1c85229ebd3fbf8a2a742cf56b36a9aa89524 /xkb | |
parent | 2b266eda6e23d16116f8a8e258192df353970279 (diff) |
xkb: fix use of uninitialized variable.
And some cosmetic changes to use stuff->change consistently.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Diffstat (limited to 'xkb')
-rw-r--r-- | xkb/xkb.c | 17 |
1 files changed, 5 insertions, 12 deletions
@@ -6423,13 +6423,10 @@ static int _XkbSetDeviceInfo(ClientPtr client, DeviceIntPtr dev, xkbSetDeviceInfoReq *stuff) { - unsigned change; char *wire; - change = stuff->change; - wire= (char *)&stuff[1]; - if (change&XkbXI_ButtonActionsMask) { + if (stuff->change&XkbXI_ButtonActionsMask) { if (!dev->button) { client->errorValue = _XkbErrCode2(XkbErr_BadClass,ButtonClass); return XkbKeyboardErrorCode; @@ -6458,14 +6455,13 @@ static int _XkbSetDeviceInfoCheck(ClientPtr client, DeviceIntPtr dev, xkbSetDeviceInfoReq *stuff) { - unsigned change; char *wire; xkbExtensionDeviceNotify ed; bzero((char *)&ed,SIZEOF(xkbExtensionDeviceNotify)); ed.deviceID= dev->id; wire= (char *)&stuff[1]; - if (change&XkbXI_ButtonActionsMask) { + if (stuff->change&XkbXI_ButtonActionsMask) { int nBtns,sz,i; XkbAction * acts; DeviceIntPtr kbd; @@ -6495,8 +6491,8 @@ _XkbSetDeviceInfoCheck(ClientPtr client, DeviceIntPtr dev, } if (stuff->change&XkbXI_IndicatorsMask) { int status= Success; - wire= SetDeviceIndicators(wire,dev,change,stuff->nDeviceLedFBs, - &status,client,&ed); + wire= SetDeviceIndicators(wire,dev,stuff->change, + stuff->nDeviceLedFBs, &status,client,&ed); if (status!=Success) return status; } @@ -6508,7 +6504,6 @@ _XkbSetDeviceInfoCheck(ClientPtr client, DeviceIntPtr dev, int ProcXkbSetDeviceInfo(ClientPtr client) { - unsigned int change; DeviceIntPtr dev; int rc; @@ -6518,10 +6513,8 @@ ProcXkbSetDeviceInfo(ClientPtr client) if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - change = stuff->change; - CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess); - CHK_MASK_LEGAL(0x01,change,XkbXI_AllFeaturesMask); + CHK_MASK_LEGAL(0x01,stuff->change,XkbXI_AllFeaturesMask); rc = _XkbSetDeviceInfoCheck(client, dev, stuff); |