summaryrefslogtreecommitdiff
path: root/hw/kdrive/sis530/sisdraw.c
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2007-11-05 14:10:55 +0000
committerDaniel Stone <daniel@fooishbar.org>2007-11-05 14:34:42 +0000
commitcaf545063457591f88e1f7bcd25dbd0342f44343 (patch)
treea2c87d098235fe7bdcc6c59dfb303b7e4b3f650a /hw/kdrive/sis530/sisdraw.c
parentd57060f16714f5667722001bd1a4500059dd59e1 (diff)
KDrive: Remove usage of alloca
Replace with heap allocations.
Diffstat (limited to 'hw/kdrive/sis530/sisdraw.c')
-rw-r--r--hw/kdrive/sis530/sisdraw.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/hw/kdrive/sis530/sisdraw.c b/hw/kdrive/sis530/sisdraw.c
index f2b39a477..595544348 100644
--- a/hw/kdrive/sis530/sisdraw.c
+++ b/hw/kdrive/sis530/sisdraw.c
@@ -1234,12 +1234,12 @@ sisFillSpans (DrawablePtr pDrawable, GCPtr pGC, int n,
return;
}
nTmp = n * miFindMaxBand(fbGetCompositeClip(pGC));
- pwidthFree = (int *)ALLOCATE_LOCAL(nTmp * sizeof(int));
- pptFree = (DDXPointRec *)ALLOCATE_LOCAL(nTmp * sizeof(DDXPointRec));
+ pwidthFree = (int *)xalloc(nTmp * sizeof(int));
+ pptFree = (DDXPointRec *)xalloc(nTmp * sizeof(DDXPointRec));
if(!pptFree || !pwidthFree)
{
- if (pptFree) DEALLOCATE_LOCAL(pptFree);
- if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree);
+ if (pptFree) xfree(pptFree);
+ if (pwidthFree) xfree(pwidthFree);
return;
}
n = miClipSpans(fbGetCompositeClip(pGC),
@@ -1273,8 +1273,8 @@ sisFillSpans (DrawablePtr pDrawable, GCPtr pGC, int n,
}
}
KdMarkSync (pDrawable->pScreen);
- DEALLOCATE_LOCAL(pptFree);
- DEALLOCATE_LOCAL(pwidthFree);
+ xfree(pptFree);
+ xfree(pwidthFree);
}
#define NUM_STACK_RECTS 1024
@@ -1323,7 +1323,7 @@ sisPolyFillRect (DrawablePtr pDrawable, GCPtr pGC,
numRects = REGION_NUM_RECTS(prgnClip) * nrectFill;
if (numRects > NUM_STACK_RECTS)
{
- pboxClippedBase = (BoxPtr)ALLOCATE_LOCAL(numRects * sizeof(BoxRec));
+ pboxClippedBase = (BoxPtr)xalloc(numRects * sizeof(BoxRec));
if (!pboxClippedBase)
return;
}
@@ -1448,7 +1448,7 @@ sisPolyFillRect (DrawablePtr pDrawable, GCPtr pGC,
}
}
if (pboxClippedBase != stackRects)
- DEALLOCATE_LOCAL(pboxClippedBase);
+ xfree(pboxClippedBase);
}
static const GCOps sisOps = {