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/chgdctl.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/chgdctl.c')
-rw-r--r-- | Xi/chgdctl.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/Xi/chgdctl.c b/Xi/chgdctl.c index 9676fb747..055f459d0 100644 --- a/Xi/chgdctl.c +++ b/Xi/chgdctl.c @@ -56,14 +56,11 @@ 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> /* control constants */ #include "XIstubs.h" -#include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "exevents.h" @@ -153,11 +150,8 @@ ProcXChangeDeviceControl(ClientPtr client) a = &dev->valuator->axes[r->first_valuator]; for (i = 0; i < r->num_valuators; i++) if (*(resolution + i) < (a + i)->min_resolution || - *(resolution + i) > (a + i)->max_resolution) { - SendErrorToClient(client, IReqCode, - X_ChangeDeviceControl, 0, BadValue); - return Success; - } + *(resolution + i) > (a + i)->max_resolution) + return BadValue; for (i = 0; i < r->num_valuators; i++) (a++)->resolution = *resolution++; @@ -269,11 +263,8 @@ out: WriteReplyToClient(client, sizeof(xChangeDeviceControlReply), &rep); } - else { - SendErrorToClient(client, IReqCode, X_ChangeDeviceControl, 0, ret); - } - return Success; + return ret; } /*********************************************************************** |