From 47fa09f728e6fd15594575205e34ed5800e22978 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 26 Feb 2025 16:08:27 +0100 Subject: [PATCH] kdrive: drop #define of Status to int The status return values always have been int (directly corresponding to X11 protocol reply status values, as defined in X.h). Seems that back about 2 decades ago, somebody started converting them to their own type, unfortunately just very inconsequently in a few places, which isn't very helpful. It would have been different if done everywhere in the whole Xserver, but doing so would be a bigger task. Therefore, for consistency, just dropping this here and just use 'int', what all the rest of the Xserver code, as well as X11 protocol headers and Xlib are doing. Signed-off-by: Enrico Weigelt, metux IT consult --- hw/kdrive/ephyr/ephyr.c | 8 ++++---- hw/kdrive/src/kdrive.h | 6 ++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index 069270219..5779d90d1 100644 --- a/hw/kdrive/ephyr/ephyr.c +++ b/hw/kdrive/ephyr/ephyr.c @@ -1261,7 +1261,7 @@ ephyrPutColors(ScreenPtr pScreen, int n, xColorItem * pdefs) /* Mouse calls */ -static Status +static int MouseInit(KdPointerInfo * pi) { pi->driverPrivate = (EphyrPointerPrivate *) @@ -1283,7 +1283,7 @@ MouseInit(KdPointerInfo * pi) return Success; } -static Status +static int MouseEnable(KdPointerInfo * pi) { ((EphyrPointerPrivate *) pi->driverPrivate)->enabled = TRUE; @@ -1318,7 +1318,7 @@ KdPointerDriver EphyrMouseDriver = { /* Keyboard */ -static Status +static int EphyrKeyboardInit(KdKeyboardInfo * ki) { KeySymsRec keySyms; @@ -1349,7 +1349,7 @@ EphyrKeyboardInit(KdKeyboardInfo * ki) return Success; } -static Status +static int EphyrKeyboardEnable(KdKeyboardInfo * ki) { ((EphyrKbdPrivate *) ki->driverPrivate)->enabled = TRUE; diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h index 432f89140..bce210f60 100644 --- a/hw/kdrive/src/kdrive.h +++ b/hw/kdrive/src/kdrive.h @@ -52,8 +52,6 @@ #define KD_DPMS_POWERDOWN 3 #define KD_DPMS_MAX KD_DPMS_POWERDOWN -#define Status int - typedef struct _KdCardInfo { struct _KdCardFuncs *cfuncs; void *closure; @@ -169,8 +167,8 @@ typedef struct _KdPointerInfo KdPointerInfo; typedef struct _KdPointerDriver { const char *name; - Status(*Init) (KdPointerInfo *); - Status(*Enable) (KdPointerInfo *); + int (*Init) (KdPointerInfo *); + int (*Enable) (KdPointerInfo *); void (*Disable) (KdPointerInfo *); void (*Fini) (KdPointerInfo *); struct _KdPointerDriver *next;