summaryrefslogtreecommitdiff
path: root/mi/mifillrct.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/mifillrct.c
parent3633ae6efb57c5405c26e8ae132b9371e5f920de (diff)
mi: Remove usage of alloca
Replace with heap allocations.
Diffstat (limited to 'mi/mifillrct.c')
-rw-r--r--mi/mifillrct.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/mi/mifillrct.c b/mi/mifillrct.c
index ca7e86445..e7646cf38 100644
--- a/mi/mifillrct.c
+++ b/mi/mifillrct.c
@@ -106,12 +106,12 @@ miPolyFillRect(pDrawable, pGC, nrectFill, prectInit)
maxheight = max(maxheight, prect->height);
}
- pptFirst = (DDXPointPtr) ALLOCATE_LOCAL(maxheight * sizeof(DDXPointRec));
- pwFirst = (int *) ALLOCATE_LOCAL(maxheight * sizeof(int));
+ pptFirst = (DDXPointPtr) xalloc(maxheight * sizeof(DDXPointRec));
+ pwFirst = (int *) xalloc(maxheight * sizeof(int));
if(!pptFirst || !pwFirst)
{
- if (pwFirst) DEALLOCATE_LOCAL(pwFirst);
- if (pptFirst) DEALLOCATE_LOCAL(pptFirst);
+ if (pwFirst) xfree(pwFirst);
+ if (pptFirst) xfree(pptFirst);
return;
}
@@ -137,6 +137,6 @@ miPolyFillRect(pDrawable, pGC, nrectFill, prectInit)
1);
prect++;
}
- DEALLOCATE_LOCAL(pwFirst);
- DEALLOCATE_LOCAL(pptFirst);
+ xfree(pwFirst);
+ xfree(pptFirst);
}