summaryrefslogtreecommitdiff
path: root/hw/vfb
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2007-11-05 14:10:03 +0000
committerDaniel Stone <daniel@fooishbar.org>2007-11-05 14:34:42 +0000
commitdef6f74f2d7342f85f3df2053e0b9c1ac483b51d (patch)
tree085f142829da3e23a9cffbfa1c5c7738ff619d36 /hw/vfb
parent259f4c36d581896ce605741b9e557a589013a9b8 (diff)
Xvfb: Remove usage of alloca
Replace with heap allocations
Diffstat (limited to 'hw/vfb')
-rw-r--r--hw/vfb/InitOutput.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c
index 812326a50..0d4ca57fe 100644
--- a/hw/vfb/InitOutput.c
+++ b/hw/vfb/InitOutput.c
@@ -482,9 +482,9 @@ vfbInstallColormap(ColormapPtr pmap)
swapcopy32(pXWDHeader->bits_per_rgb, pVisual->bitsPerRGBValue);
swapcopy32(pXWDHeader->colormap_entries, 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));
for (i = 0; i < entries; i++) ppix[i] = i;
/* XXX truecolor */
@@ -499,9 +499,9 @@ vfbInstallColormap(ColormapPtr pmap)
}
(*pmap->pScreen->StoreColors)(pmap, entries, defs);
- DEALLOCATE_LOCAL(ppix);
- DEALLOCATE_LOCAL(prgb);
- DEALLOCATE_LOCAL(defs);
+ xfree(ppix);
+ xfree(prgb);
+ xfree(defs);
}
}