From 0ce61e21d6d7dcca0090e319bbcdb678570f2c3f Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 3 Oct 2008 16:05:19 -0400 Subject: Remove the Must_have_memory hack. Also remove an astonishing amount of misunderstanding of how casts work. --- mi/micursor.c | 13 ++++--------- mi/migc.c | 6 ++---- 2 files changed, 6 insertions(+), 13 deletions(-) (limited to 'mi') diff --git a/mi/micursor.c b/mi/micursor.c index ec20946a3..8b1649039 100644 --- a/mi/micursor.c +++ b/mi/micursor.c @@ -54,8 +54,6 @@ SOFTWARE. #include "mi.h" #include "inputstr.h" -extern Bool Must_have_memory; - _X_EXPORT void miRecolorCursor(DeviceIntPtr pDev, ScreenPtr pScr, CursorPtr pCurs, Bool displayed) @@ -64,11 +62,8 @@ miRecolorCursor(DeviceIntPtr pDev, ScreenPtr pScr, * This is guaranteed to correct any color-dependent state which may have * been bound up in private state created by RealizeCursor */ - (* pScr->UnrealizeCursor)( pDev, pScr, pCurs); - Must_have_memory = TRUE; /* XXX */ - (* pScr->RealizeCursor)( pDev, pScr, pCurs); - Must_have_memory = FALSE; /* XXX */ - if ( displayed) - (* pScr->DisplayCursor)( pDev, pScr, pCurs); - + pScr->UnrealizeCursor(pDev, pScr, pCurs); + pScr->RealizeCursor(pDev, pScr, pCurs); + if (displayed) + pScr->DisplayCursor(pDev, pScr, pCurs); } diff --git a/mi/migc.c b/mi/migc.c index 7fb28c43f..8590d913d 100644 --- a/mi/migc.c +++ b/mi/migc.c @@ -63,11 +63,9 @@ miCreateGCOps(GCOpsPtr prototype) { GCOpsPtr ret; - /* XXX */ Must_have_memory = TRUE; - ret = (GCOpsPtr) xalloc(sizeof(GCOps)); - /* XXX */ Must_have_memory = FALSE; + ret = xalloc(sizeof(GCOps)); if (!ret) - return 0; + return NULL; *ret = *prototype; ret->devPrivate.val = 1; return ret; -- cgit v1.2.3