[PATCH] kdrive: adjust BlockHandler/WakeupHandler to new API

Peter Hutterer peter.hutterer at who-t.net
Wed Jun 20 20:45:06 PDT 2012


Missing API update caused Xephyr to crash on startup, garbage memory
dereference when accessing timeout.
Introduced in 1f0e8bd5eb1a5539689cfc4f5a6b86b530907ec5

kdrive.c:868:27: warning: assignment from incompatible pointer type
kdrive.c:869:28: warning: assignment from incompatible pointer type

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 hw/kdrive/src/kdrive.h |    6 ++----
 hw/kdrive/src/kinput.c |    5 ++---
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h
index a08a218..b37041f 100644
--- a/hw/kdrive/src/kdrive.h
+++ b/hw/kdrive/src/kdrive.h
@@ -537,13 +537,11 @@ void
 
 void
 
-KdBlockHandler(ScreenPtr pScreen,
-               pointer blockData, pointer timeout, pointer readmask);
+KdBlockHandler(ScreenPtr pScreen, pointer timeout, pointer readmask);
 
 void
 
-KdWakeupHandler(ScreenPtr pScreen,
-                pointer data, unsigned long result, pointer readmask);
+KdWakeupHandler(ScreenPtr pScreen, unsigned long result, pointer readmask);
 
 void
  KdDisableInput(void);
diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c
index 58ae552..0e06fd4 100644
--- a/hw/kdrive/src/kinput.c
+++ b/hw/kdrive/src/kinput.c
@@ -1972,7 +1972,7 @@ _KdEnqueuePointerEvent(KdPointerInfo * pi, int type, int x, int y, int z,
 }
 
 void
-KdBlockHandler(ScreenPtr pScreen, pointer blockData, pointer timeout, pointer readmask)
+KdBlockHandler(ScreenPtr pScreen, pointer timeout, pointer readmask)
 {
     KdPointerInfo *pi;
     int myTimeout = 0;
@@ -1998,8 +1998,7 @@ KdBlockHandler(ScreenPtr pScreen, pointer blockData, pointer timeout, pointer re
 }
 
 void
-KdWakeupHandler(ScreenPtr pScreen,
-                pointer data, unsigned long lresult, pointer readmask)
+KdWakeupHandler(ScreenPtr pScreen, unsigned long lresult, pointer readmask)
 {
     int result = (int) lresult;
     fd_set *pReadmask = (fd_set *) readmask;
-- 
1.7.10.2



More information about the xorg-devel mailing list