Xext: Remove usage of alloca

Replace with heap allocations.
This commit is contained in:
Daniel Stone 2007-11-05 14:18:22 +00:00
commit 934281126f
10 changed files with 66 additions and 66 deletions

View file

@ -673,7 +673,7 @@ CreateSaverWindow (pScreen)
wantMap = wColormap (pWin);
if (wantMap == None)
return TRUE;
installedMaps = (Colormap *) ALLOCATE_LOCAL (pScreen->maxInstalledCmaps *
installedMaps = (Colormap *) xalloc (pScreen->maxInstalledCmaps *
sizeof (Colormap));
numInstalled = (*pWin->drawable.pScreen->ListInstalledColormaps)
(pScreen, installedMaps);
@ -681,7 +681,7 @@ CreateSaverWindow (pScreen)
if (installedMaps[i] == wantMap)
break;
DEALLOCATE_LOCAL ((char *) installedMaps);
xfree ((char *) installedMaps);
if (i < numInstalled)
return TRUE;