aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nx-X11/programs/Xserver/Xi/chgkbd.c2
-rw-r--r--nx-X11/programs/Xserver/dix/events.c25
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXevents.c4
-rw-r--r--nx-X11/programs/Xserver/include/globals.h1
-rw-r--r--nx-X11/programs/Xserver/mi/micursor.c12
-rw-r--r--nx-X11/programs/Xserver/mi/migc.c6
-rw-r--r--nx-X11/programs/Xserver/os/utils.c2
7 files changed, 15 insertions, 37 deletions
diff --git a/nx-X11/programs/Xserver/Xi/chgkbd.c b/nx-X11/programs/Xserver/Xi/chgkbd.c
index 8f4e35773..2ca631e2d 100644
--- a/nx-X11/programs/Xserver/Xi/chgkbd.c
+++ b/nx-X11/programs/Xserver/Xi/chgkbd.c
@@ -153,11 +153,9 @@ ProcXChangeKeyboardDevice(register ClientPtr client)
df->time = xf->time;
df->traceGood = xf->traceGood;
if (df->traceSize != xf->traceSize) {
- Must_have_memory = TRUE; /* XXX */
df->trace = (WindowPtr *) realloc(df->trace,
xf->traceSize *
sizeof(WindowPtr));
- Must_have_memory = FALSE; /* XXX */
}
df->traceSize = xf->traceSize;
for (i = 0; i < df->traceSize; i++)
diff --git a/nx-X11/programs/Xserver/dix/events.c b/nx-X11/programs/Xserver/dix/events.c
index 745932af3..70224c3b8 100644
--- a/nx-X11/programs/Xserver/dix/events.c
+++ b/nx-X11/programs/Xserver/dix/events.c
@@ -1938,10 +1938,8 @@ XYToWindow(int x, int y)
if (spriteTraceGood >= spriteTraceSize)
{
spriteTraceSize += 10;
- Must_have_memory = TRUE; /* XXX */
- spriteTrace = (WindowPtr *)realloc(
+ spriteTrace = realloc(
spriteTrace, spriteTraceSize*sizeof(WindowPtr));
- Must_have_memory = FALSE; /* XXX */
}
spriteTrace[spriteTraceGood++] = pWin;
pWin = pWin->firstChild;
@@ -2455,11 +2453,9 @@ CheckPassiveGrabsOnWindow(
{
if (device->sync.evcount < count)
{
- Must_have_memory = TRUE; /* XXX */
- device->sync.event = (xEvent *)realloc(device->sync.event,
- count*
- sizeof(xEvent));
- Must_have_memory = FALSE; /* XXX */
+ device->sync.event = realloc(device->sync.event,
+ count*
+ sizeof(xEvent));
}
device->sync.evcount = count;
for (dxE = device->sync.event; --count >= 0; dxE++, xE++)
@@ -2627,10 +2623,8 @@ DeliverGrabbedEvent(register xEvent *xE, register DeviceIntPtr thisDev,
FreezeThaw(thisDev, TRUE);
if (thisDev->sync.evcount < count)
{
- Must_have_memory = TRUE; /* XXX */
- thisDev->sync.event = (xEvent *)realloc(thisDev->sync.event,
- count*sizeof(xEvent));
- Must_have_memory = FALSE; /* XXX */
+ thisDev->sync.event = realloc(thisDev->sync.event,
+ count*sizeof(xEvent));
}
thisDev->sync.evcount = count;
for (dxE = thisDev->sync.event; --count >= 0; dxE++, xE++)
@@ -3505,11 +3499,8 @@ SetInputFocus(
if (depth > focus->traceSize)
{
focus->traceSize = depth+1;
- Must_have_memory = TRUE; /* XXX */
- focus->trace = (WindowPtr *)realloc(focus->trace,
- focus->traceSize *
- sizeof(WindowPtr));
- Must_have_memory = FALSE; /* XXX */
+ focus->trace = realloc(focus->trace,
+ focus->traceSize * sizeof(WindowPtr));
}
focus->traceGood = depth;
for (pWin = focusWin, depth--; pWin; pWin = pWin->parent, depth--)
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
index 43dfe8613..78d74a0d5 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
@@ -367,10 +367,8 @@ XYToWindow(int x, int y)
if (spriteTraceGood >= spriteTraceSize)
{
spriteTraceSize += 10;
- Must_have_memory = TRUE; /* XXX */
- spriteTrace = (WindowPtr *)realloc(
+ spriteTrace = realloc(
spriteTrace, spriteTraceSize*sizeof(WindowPtr));
- Must_have_memory = FALSE; /* XXX */
}
spriteTrace[spriteTraceGood++] = pWin;
pWin = pWin->firstChild;
diff --git a/nx-X11/programs/Xserver/include/globals.h b/nx-X11/programs/Xserver/include/globals.h
index d5b9c4407..50aaaa2bf 100644
--- a/nx-X11/programs/Xserver/include/globals.h
+++ b/nx-X11/programs/Xserver/include/globals.h
@@ -20,7 +20,6 @@ extern int monitorResolution;
extern Bool loadableFonts;
extern int defaultColorVisualClass;
-extern Bool Must_have_memory;
extern int GrabInProgress;
extern char *ConnectionInfo;
extern Bool noTestExtensions;
diff --git a/nx-X11/programs/Xserver/mi/micursor.c b/nx-X11/programs/Xserver/mi/micursor.c
index e95c43b3d..90b0f2ae9 100644
--- a/nx-X11/programs/Xserver/mi/micursor.c
+++ b/nx-X11/programs/Xserver/mi/micursor.c
@@ -53,8 +53,6 @@ SOFTWARE.
#include "misc.h"
#include "mi.h"
-extern Bool Must_have_memory;
-
void
miRecolorCursor( pScr, pCurs, displayed)
ScreenPtr pScr;
@@ -65,11 +63,9 @@ miRecolorCursor( pScr, pCurs, displayed)
* This is guaranteed to correct any color-dependent state which may have
* been bound up in private state created by RealizeCursor
*/
- (* pScr->UnrealizeCursor)( pScr, pCurs);
- Must_have_memory = TRUE; /* XXX */
- (* pScr->RealizeCursor)( pScr, pCurs);
- Must_have_memory = FALSE; /* XXX */
- if ( displayed)
- (* pScr->DisplayCursor)( pScr, pCurs);
+ pScr->UnrealizeCursor(pScr, pCurs);
+ pScr->RealizeCursor(pScr, pCurs);
+ if (displayed)
+ pScr->DisplayCursor(pScr, pCurs);
}
diff --git a/nx-X11/programs/Xserver/mi/migc.c b/nx-X11/programs/Xserver/mi/migc.c
index 4d67cbf5d..afd5031a4 100644
--- a/nx-X11/programs/Xserver/mi/migc.c
+++ b/nx-X11/programs/Xserver/mi/migc.c
@@ -68,11 +68,9 @@ miCreateGCOps(prototype)
{
GCOpsPtr ret;
- /* XXX */ Must_have_memory = TRUE;
- ret = (GCOpsPtr) malloc(sizeof(GCOps));
- /* XXX */ Must_have_memory = FALSE;
+ ret = malloc(sizeof(GCOps));
if (!ret)
- return 0;
+ return NULL;
*ret = *prototype;
ret->devPrivate.val = 1;
return ret;
diff --git a/nx-X11/programs/Xserver/os/utils.c b/nx-X11/programs/Xserver/os/utils.c
index 0a1e3f7b2..5634bb621 100644
--- a/nx-X11/programs/Xserver/os/utils.c
+++ b/nx-X11/programs/Xserver/os/utils.c
@@ -257,8 +257,6 @@ Bool PanoramiXExtensionDisabledHack = FALSE;
int auditTrailLevel = 1;
-Bool Must_have_memory = FALSE;
-
#if defined(SVR4) || defined(__linux__) || defined(CSRG_BASED)
#define HAS_SAVED_IDS_AND_SETEUID
#endif