aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/dix
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-06-01 00:52:06 +0200
committerUlrich Sibiller <uli42@gmx.de>2019-06-12 18:35:01 +0200
commita765857aaa450862f6a3dc5de811671fbc82ca61 (patch)
tree1a964cb04a9d635d16a24c22cb847d830e01a954 /nx-X11/programs/Xserver/dix
parentc0754a35755cdd4e25386abc6378e07605845948 (diff)
downloadnx-libs-a765857aaa450862f6a3dc5de811671fbc82ca61.tar.gz
nx-libs-a765857aaa450862f6a3dc5de811671fbc82ca61.tar.bz2
nx-libs-a765857aaa450862f6a3dc5de811671fbc82ca61.zip
Remove the Must_have_memory hack.
We are not using any alloc function that respects that variable, so lets drop it. Backport of this commit: commit 0ce61e21d6d7dcca0090e319bbcdb678570f2c3f Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 16:05:19 2008 -0400 Remove the Must_have_memory hack. Also remove an astonishing amount of misunderstanding of how casts work.
Diffstat (limited to 'nx-X11/programs/Xserver/dix')
-rw-r--r--nx-X11/programs/Xserver/dix/events.c25
1 files changed, 8 insertions, 17 deletions
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--)