summaryrefslogtreecommitdiff
path: root/xserver/Xi/getkmap.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2012-06-10 13:21:33 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2012-06-10 13:21:33 +0000
commit171e929a08098b6c844887adc43879c7579dc15f (patch)
tree6b4d2e3bc20dbd4dc9a1f031416e66614c53dd21 /xserver/Xi/getkmap.c
parent68781b09de2c95b87ea898c4ecf3018dfb4460d2 (diff)
Update to xserver 1.12.2. tested by naddy@, krw@, mpi@.
Diffstat (limited to 'xserver/Xi/getkmap.c')
-rw-r--r--xserver/Xi/getkmap.c32
1 files changed, 14 insertions, 18 deletions
diff --git a/xserver/Xi/getkmap.c b/xserver/Xi/getkmap.c
index c38467b96..006be62a6 100644
--- a/xserver/Xi/getkmap.c
+++ b/xserver/Xi/getkmap.c
@@ -54,7 +54,7 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "exglobals.h"
@@ -74,10 +74,8 @@ SOFTWARE.
int
SProcXGetDeviceKeyMapping(ClientPtr client)
{
- char n;
-
REQUEST(xGetDeviceKeyMappingReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
return (ProcXGetDeviceKeyMapping(client));
}
@@ -101,20 +99,20 @@ ProcXGetDeviceKeyMapping(ClientPtr client)
rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess);
if (rc != Success)
- return rc;
+ return rc;
if (dev->key == NULL)
- return BadMatch;
+ return BadMatch;
xkb = dev->key->xkbInfo->desc;
if (stuff->firstKeyCode < xkb->min_key_code ||
- stuff->firstKeyCode > xkb->max_key_code) {
- client->errorValue = stuff->firstKeyCode;
- return BadValue;
+ stuff->firstKeyCode > xkb->max_key_code) {
+ client->errorValue = stuff->firstKeyCode;
+ return BadValue;
}
if (stuff->firstKeyCode + stuff->count > xkb->max_key_code + 1) {
- client->errorValue = stuff->count;
- return BadValue;
+ client->errorValue = stuff->count;
+ return BadValue;
}
syms = XkbGetCoreMap(dev);
@@ -125,7 +123,7 @@ ProcXGetDeviceKeyMapping(ClientPtr client)
rep.RepType = X_GetDeviceKeyMapping;
rep.sequenceNumber = client->sequence;
rep.keySymsPerKeyCode = syms->mapWidth;
- rep.length = (syms->mapWidth * stuff->count); /* KeySyms are 4 bytes */
+ rep.length = (syms->mapWidth * stuff->count); /* KeySyms are 4 bytes */
WriteReplyToClient(client, sizeof(xGetDeviceKeyMappingReply), &rep);
client->pSwapReplyFunc = (ReplySwapPtr) CopySwap32Write;
@@ -148,11 +146,9 @@ ProcXGetDeviceKeyMapping(ClientPtr client)
void
SRepXGetDeviceKeyMapping(ClientPtr client, int size,
- xGetDeviceKeyMappingReply * rep)
+ xGetDeviceKeyMappingReply * rep)
{
- char n;
-
- swaps(&rep->sequenceNumber, n);
- swapl(&rep->length, n);
- WriteToClient(client, size, (char *)rep);
+ swaps(&rep->sequenceNumber);
+ swapl(&rep->length);
+ WriteToClient(client, size, (char *) rep);
}