Commit dc1f8c6e authored by Michal Srb's avatar Michal Srb Committed by Peter Hutterer

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: default avatarMichal Srb <msrb@suse.com>
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 83261c52
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment