Module Name: xsrc
Committed By: tsutsui
Date: Thu Aug 13 05:12:35 UTC 2020
Modified Files:
xsrc/external/mit/xorg-server/dist/hw/sun: sunIo.c sunKbd.c sunMouse.c
Log Message:
Avoid dumb DevicePtr casts.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 xsrc/external/mit/xorg-server/dist/hw/sun/sunIo.c
cvs rdiff -u -r1.6 -r1.7 xsrc/external/mit/xorg-server/dist/hw/sun/sunKbd.c
cvs rdiff -u -r1.1 -r1.2 xsrc/external/mit/xorg-server/dist/hw/sun/sunMouse.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: xsrc/external/mit/xorg-server/dist/hw/sun/sunIo.c
diff -u xsrc/external/mit/xorg-server/dist/hw/sun/sunIo.c:1.4 xsrc/external/mit/xorg-server/dist/hw/sun/sunIo.c:1.5
--- xsrc/external/mit/xorg-server/dist/hw/sun/sunIo.c:1.4 Tue Aug 11 06:49:09 2020
+++ xsrc/external/mit/xorg-server/dist/hw/sun/sunIo.c Thu Aug 13 05:12:35 2020
@@ -170,9 +170,10 @@ AbortDDX(enum ExitCode error)
#else
(void) OsSignal (SIGIO, SIG_IGN);
#endif
- devPtr = (DevicePtr)sunKeyboardDevice;
- if (devPtr)
+ if (sunKeyboardDevice) {
+ devPtr = &sunKeyboardDevice->public;
(void) sunChangeKbdTranslation (((sunKbdPrivPtr)(devPtr->devicePrivate))->fd, FALSE);
+ }
#if defined(SVR4) || defined(CSRG_BASED)
sunNonBlockConsoleOff ();
#else
Index: xsrc/external/mit/xorg-server/dist/hw/sun/sunKbd.c
diff -u xsrc/external/mit/xorg-server/dist/hw/sun/sunKbd.c:1.6 xsrc/external/mit/xorg-server/dist/hw/sun/sunKbd.c:1.7
--- xsrc/external/mit/xorg-server/dist/hw/sun/sunKbd.c:1.6 Sat Aug 1 13:15:57 2020
+++ xsrc/external/mit/xorg-server/dist/hw/sun/sunKbd.c Thu Aug 13 05:12:35 2020
@@ -613,7 +613,7 @@ sunInitKbdNames(XkbRMLVOSet *rmlvo, sunK
int
sunKbdProc(DeviceIntPtr device, int what)
{
- DevicePtr pKeyboard = (DevicePtr) device;
+ DevicePtr pKeyboard = &device->public;
sunKbdPrivPtr pPriv;
KeybdCtrl* ctrl = &device->kbdfeed->ctrl;
XkbRMLVOSet rmlvo;
@@ -623,7 +623,7 @@ sunKbdProc(DeviceIntPtr device, int what
switch (what) {
case DEVICE_INIT:
- if (pKeyboard != (DevicePtr)sunKeyboardDevice) {
+ if (pKeyboard != &sunKeyboardDevice->public) {
ErrorF ("Cannot open non-system keyboard\n");
return (!Success);
}
Index: xsrc/external/mit/xorg-server/dist/hw/sun/sunMouse.c
diff -u xsrc/external/mit/xorg-server/dist/hw/sun/sunMouse.c:1.1 xsrc/external/mit/xorg-server/dist/hw/sun/sunMouse.c:1.2
--- xsrc/external/mit/xorg-server/dist/hw/sun/sunMouse.c:1.1 Wed Jul 22 20:38:29 2020
+++ xsrc/external/mit/xorg-server/dist/hw/sun/sunMouse.c Thu Aug 13 05:12:35 2020
@@ -123,7 +123,7 @@ sunMouseCtrl(DeviceIntPtr device, PtrCtr
int
sunMouseProc(DeviceIntPtr device, int what)
{
- DevicePtr pMouse = (DevicePtr) device;
+ DevicePtr pMouse = &device->public;
int format;
static int oformat;
BYTE map[4];
@@ -132,7 +132,7 @@ sunMouseProc(DeviceIntPtr device, int wh
switch (what) {
case DEVICE_INIT:
- if (pMouse != (DevicePtr)sunPointerDevice) {
+ if (pMouse != &sunPointerDevice->public) {
ErrorF ("Cannot open non-system mouse");
return !Success;
}