summaryrefslogtreecommitdiff
path: root/mi/miwideline.c
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2007-11-05 14:08:51 +0000
committerDaniel Stone <daniel@fooishbar.org>2007-11-05 14:34:41 +0000
commitbe9ee17f960cc3d8a8f999cab1579e83d9aea520 (patch)
treef563ce4405d197063ed262da3f5355d334335e43 /mi/miwideline.c
parent3633ae6efb57c5405c26e8ae132b9371e5f920de (diff)
downloadxserver-be9ee17f960cc3d8a8f999cab1579e83d9aea520.tar.gz
mi: Remove usage of alloca
Replace with heap allocations.
Diffstat (limited to 'mi/miwideline.c')
-rw-r--r--mi/miwideline.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/mi/miwideline.c b/mi/miwideline.c
index 8c6022f6f..f080ca11d 100644
--- a/mi/miwideline.c
+++ b/mi/miwideline.c
@@ -95,13 +95,13 @@ miFillPolyHelper (DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel,
if (!spanData)
{
- pptInit = (DDXPointPtr) ALLOCATE_LOCAL (overall_height * sizeof(*ppt));
+ pptInit = (DDXPointPtr) xalloc (overall_height * sizeof(*ppt));
if (!pptInit)
return;
- pwidthInit = (int *) ALLOCATE_LOCAL (overall_height * sizeof(*pwidth));
+ pwidthInit = (int *) xalloc (overall_height * sizeof(*pwidth));
if (!pwidthInit)
{
- DEALLOCATE_LOCAL (pptInit);
+ xfree (pptInit);
return;
}
ppt = pptInit;
@@ -167,8 +167,8 @@ miFillPolyHelper (DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel,
if (!spanData)
{
(*pGC->ops->FillSpans) (pDrawable, pGC, ppt - pptInit, pptInit, pwidthInit, TRUE);
- DEALLOCATE_LOCAL (pwidthInit);
- DEALLOCATE_LOCAL (pptInit);
+ xfree (pwidthInit);
+ xfree (pptInit);
if (pixel != oldPixel)
{
DoChangeGC (pGC, GCForeground, &oldPixel, FALSE);
@@ -1045,13 +1045,13 @@ miLineArc (
}
if (!spanData)
{
- points = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec) * pGC->lineWidth);
+ points = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * pGC->lineWidth);
if (!points)
return;
- widths = (int *)ALLOCATE_LOCAL(sizeof(int) * pGC->lineWidth);
+ widths = (int *)xalloc(sizeof(int) * pGC->lineWidth);
if (!widths)
{
- DEALLOCATE_LOCAL(points);
+ xfree(points);
return;
}
oldPixel = pGC->fgPixel;
@@ -1086,8 +1086,8 @@ miLineArc (
if (!spanData)
{
(*pGC->ops->FillSpans)(pDraw, pGC, n, points, widths, TRUE);
- DEALLOCATE_LOCAL(widths);
- DEALLOCATE_LOCAL(points);
+ xfree(widths);
+ xfree(points);
if (pixel != oldPixel)
{
DoChangeGC(pGC, GCForeground, &oldPixel, FALSE);