summaryrefslogtreecommitdiff
path: root/hw/xfree86/vgahw
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2007-11-05 14:11:59 +0000
committerDaniel Stone <daniel@fooishbar.org>2007-11-05 14:34:42 +0000
commit733d42065f2c24505b3874ce51c18f6063c2b67e (patch)
treedd8b4029631bfa4560632fad1912c0bc1802498d /hw/xfree86/vgahw
parentcaf545063457591f88e1f7bcd25dbd0342f44343 (diff)
XFree86: Remove usage of alloca
Replace with heap allocations.
Diffstat (limited to 'hw/xfree86/vgahw')
-rw-r--r--hw/xfree86/vgahw/vgaCmap.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/hw/xfree86/vgahw/vgaCmap.c b/hw/xfree86/vgahw/vgaCmap.c
index 609376a57..44043c6c7 100644
--- a/hw/xfree86/vgahw/vgaCmap.c
+++ b/hw/xfree86/vgahw/vgaCmap.c
@@ -236,9 +236,9 @@ vgaInstallColormap(pmap)
else
entries = pmap->pVisual->ColormapEntries;
- ppix = (Pixel *)ALLOCATE_LOCAL( entries * sizeof(Pixel));
- prgb = (xrgb *)ALLOCATE_LOCAL( entries * sizeof(xrgb));
- defs = (xColorItem *)ALLOCATE_LOCAL(entries * sizeof(xColorItem));
+ ppix = (Pixel *)xalloc( entries * sizeof(Pixel));
+ prgb = (xrgb *)xalloc( entries * sizeof(xrgb));
+ defs = (xColorItem *)xalloc(entries * sizeof(xColorItem));
if ( oldmap != NOMAPYET)
WalkTree( pmap->pScreen, TellLostMap, &oldmap->mid);
@@ -261,9 +261,9 @@ vgaInstallColormap(pmap)
WalkTree(pmap->pScreen, TellGainedMap, &pmap->mid);
- DEALLOCATE_LOCAL(ppix);
- DEALLOCATE_LOCAL(prgb);
- DEALLOCATE_LOCAL(defs);
+ xfree(ppix);
+ xfree(prgb);
+ xfree(defs);
}