From 31a7994ac7365562ef1d00e0a7b25f967a961a4e Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 24 Sep 2007 13:33:01 -0400 Subject: Input: Return errors to the dispatcher instead of sending them ourself. Also fixed two "unused variable: stuff" warnings. --- Xi/getmmap.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'Xi/getmmap.c') diff --git a/Xi/getmmap.c b/Xi/getmmap.c index 038937ef7..8a99d63ed 100644 --- a/Xi/getmmap.c +++ b/Xi/getmmap.c @@ -56,12 +56,9 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include #include /* Request macro */ -#include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" @@ -102,18 +99,13 @@ ProcXGetDeviceModifierMapping(ClientPtr client) REQUEST_SIZE_MATCH(xGetDeviceModifierMappingReq); dev = LookupDeviceIntRec(stuff->deviceid); - if (dev == NULL) { - SendErrorToClient(client, IReqCode, X_GetDeviceModifierMapping, 0, - BadDevice); - return Success; - } + if (dev == NULL) + return BadDevice; kp = dev->key; - if (kp == NULL) { - SendErrorToClient(client, IReqCode, X_GetDeviceModifierMapping, 0, - BadMatch); - return Success; - } + if (kp == NULL) + return BadMatch; + maxkeys = kp->maxKeysPerModifier; rep.repType = X_Reply; -- cgit v1.2.3