diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2007-09-24 13:33:01 -0400 |
---|---|---|
committer | Eamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil> | 2007-09-26 07:26:59 -0400 |
commit | 31a7994ac7365562ef1d00e0a7b25f967a961a4e (patch) | |
tree | a2054c0e371e9c62396f2e09df469142dca0a633 /Xi/getfctl.c | |
parent | 56ffc381d32687242dd094395fcf2216339bab2a (diff) |
Input: Return errors to the dispatcher instead of sending them ourself.
Also fixed two "unused variable: stuff" warnings.
Diffstat (limited to 'Xi/getfctl.c')
-rw-r--r-- | Xi/getfctl.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/Xi/getfctl.c b/Xi/getfctl.c index 5ca90dbf0..7dff32f4f 100644 --- a/Xi/getfctl.c +++ b/Xi/getfctl.c @@ -56,12 +56,9 @@ SOFTWARE. #include <dix-config.h> #endif -#include <X11/X.h> /* for inputstr.h */ -#include <X11/Xproto.h> /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include <X11/extensions/XI.h> #include <X11/extensions/XIproto.h> -#include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" @@ -308,10 +305,8 @@ ProcXGetFeedbackControl(ClientPtr client) REQUEST_SIZE_MATCH(xGetFeedbackControlReq); dev = LookupDeviceIntRec(stuff->deviceid); - if (dev == NULL) { - SendErrorToClient(client, IReqCode, X_GetFeedbackControl, 0, BadDevice); - return Success; - } + if (dev == NULL) + return BadDevice; rep.repType = X_Reply; rep.RepType = X_GetFeedbackControl; @@ -345,16 +340,12 @@ ProcXGetFeedbackControl(ClientPtr client) total_length += sizeof(xBellFeedbackState); } - if (total_length == 0) { - SendErrorToClient(client, IReqCode, X_GetFeedbackControl, 0, BadMatch); - return Success; - } + if (total_length == 0) + return BadMatch; buf = (char *)xalloc(total_length); - if (!buf) { - SendErrorToClient(client, IReqCode, X_GetFeedbackControl, 0, BadAlloc); - return Success; - } + if (!buf) + return BadAlloc; savbuf = buf; for (k = dev->kbdfeed; k; k = k->next) |