summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Srb <msrb@suse.com>2014-11-01 20:00:53 +0200
committerPeter Hutterer <peter.hutterer@who-t.net>2014-11-03 15:28:35 +1000
commitdc1f8c6ec1ba8135afa185c8e8360c1ed90bf96c (patch)
tree28adc2871bffd7eaa43f1605dc756891863f145b
parent83261c52a17543437882e2863b7f06a92c9039f8 (diff)
Do not return NoSuchExtension casted to pointer as an error.
Several functions were returning NoSuchExtension casted to a pointer in case of an error. Often in parallel with returning NULL in case of another error. It is undocumented and certainly wrong. Signed-off-by: Michal Srb <msrb@suse.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/XGMotion.c2
-rw-r--r--src/XGetDCtl.c2
-rw-r--r--src/XGetFCtl.c2
-rw-r--r--src/XGetKMap.c2
-rw-r--r--src/XGetMMap.c2
-rw-r--r--src/XGetProp.c2
-rw-r--r--src/XOpenDev.c2
-rw-r--r--src/XQueryDv.c2
8 files changed, 8 insertions, 8 deletions
diff --git a/src/XGMotion.c b/src/XGMotion.c
index a4c75b6..7785843 100644
--- a/src/XGMotion.c
+++ b/src/XGMotion.c
@@ -81,7 +81,7 @@ XGetDeviceMotionEvents(
LockDisplay(dpy);
if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1)
- return ((XDeviceTimeCoord *) NoSuchExtension);
+ return NULL;
GetReq(GetDeviceMotionEvents, req);
req->reqType = info->codes->major_opcode;
diff --git a/src/XGetDCtl.c b/src/XGetDCtl.c
index b576aa5..c5d3b53 100644
--- a/src/XGetDCtl.c
+++ b/src/XGetDCtl.c
@@ -79,7 +79,7 @@ XGetDeviceControl(
LockDisplay(dpy);
if (_XiCheckExtInit(dpy, XInput_Add_XChangeDeviceControl, info) == -1)
- return ((XDeviceControl *) NoSuchExtension);
+ return NULL;
GetReq(GetDeviceControl, req);
req->reqType = info->codes->major_opcode;
diff --git a/src/XGetFCtl.c b/src/XGetFCtl.c
index 2d71fab..7fd6d0e 100644
--- a/src/XGetFCtl.c
+++ b/src/XGetFCtl.c
@@ -79,7 +79,7 @@ XGetFeedbackControl(
LockDisplay(dpy);
if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1)
- return ((XFeedbackState *) NoSuchExtension);
+ return NULL;
GetReq(GetFeedbackControl, req);
req->reqType = info->codes->major_opcode;
diff --git a/src/XGetKMap.c b/src/XGetKMap.c
index 00dde06..0540ce4 100644
--- a/src/XGetKMap.c
+++ b/src/XGetKMap.c
@@ -78,7 +78,7 @@ XGetDeviceKeyMapping(register Display * dpy, XDevice * dev,
LockDisplay(dpy);
if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1)
- return ((KeySym *) NoSuchExtension);
+ return NULL;
GetReq(GetDeviceKeyMapping, req);
req->reqType = info->codes->major_opcode;
diff --git a/src/XGetMMap.c b/src/XGetMMap.c
index ce10c2d..246698c 100644
--- a/src/XGetMMap.c
+++ b/src/XGetMMap.c
@@ -73,7 +73,7 @@ XGetDeviceModifierMapping(
LockDisplay(dpy);
if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1)
- return ((XModifierKeymap *) NoSuchExtension);
+ return NULL;
GetReq(GetDeviceModifierMapping, req);
req->reqType = info->codes->major_opcode;
diff --git a/src/XGetProp.c b/src/XGetProp.c
index 8c69ef2..a3fa558 100644
--- a/src/XGetProp.c
+++ b/src/XGetProp.c
@@ -75,7 +75,7 @@ XGetDeviceDontPropagateList(
LockDisplay(dpy);
if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1)
- return ((XEventClass *) NoSuchExtension);
+ return NULL;
GetReq(GetDeviceDontPropagateList, req);
req->reqType = info->codes->major_opcode;
diff --git a/src/XOpenDev.c b/src/XOpenDev.c
index e784f8b..029dec2 100644
--- a/src/XOpenDev.c
+++ b/src/XOpenDev.c
@@ -73,7 +73,7 @@ XOpenDevice(
LockDisplay(dpy);
if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1)
- return ((XDevice *) NoSuchExtension);
+ return NULL;
GetReq(OpenDevice, req);
req->reqType = info->codes->major_opcode;
diff --git a/src/XQueryDv.c b/src/XQueryDv.c
index 3836777..de1c0e5 100644
--- a/src/XQueryDv.c
+++ b/src/XQueryDv.c
@@ -78,7 +78,7 @@ XQueryDeviceState(
LockDisplay(dpy);
if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1)
- return ((XDeviceState *) NoSuchExtension);
+ return NULL;
GetReq(QueryDeviceState, req);
req->reqType = info->codes->major_opcode;