summaryrefslogtreecommitdiff
path: root/render/mitri.c
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2007-11-05 13:59:51 +0000
committerDaniel Stone <daniel@fooishbar.org>2007-11-05 14:34:41 +0000
commite0491f470e130147191388168e878e3a7348afaf (patch)
treef004513bbc59fec4cbcd31eeff4883d82d24054e /render/mitri.c
parent59774af86b851c7fb8989cef6c013522549000b8 (diff)
Render: Remove usage of alloca
Replace it with heap-based allocations.
Diffstat (limited to 'render/mitri.c')
-rw-r--r--render/mitri.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/render/mitri.c b/render/mitri.c
index 374e2fdc7..a92c19b7e 100644
--- a/render/mitri.c
+++ b/render/mitri.c
@@ -144,7 +144,7 @@ miTriStrip (CARD8 op,
if (npoint < 3)
return;
ntri = npoint - 2;
- tris = ALLOCATE_LOCAL (ntri * sizeof (xTriangle));
+ tris = xalloc (ntri * sizeof (xTriangle));
if (!tris)
return;
for (tri = tris; npoint >= 3; npoint--, points++, tri++)
@@ -154,7 +154,7 @@ miTriStrip (CARD8 op,
tri->p3 = points[2];
}
(*ps->Triangles) (op, pSrc, pDst, maskFormat, xSrc, ySrc, ntri, tris);
- DEALLOCATE_LOCAL (tris);
+ xfree (tris);
}
void
@@ -176,7 +176,7 @@ miTriFan (CARD8 op,
if (npoint < 3)
return;
ntri = npoint - 2;
- tris = ALLOCATE_LOCAL (ntri * sizeof (xTriangle));
+ tris = xalloc (ntri * sizeof (xTriangle));
if (!tris)
return;
first = points++;
@@ -187,5 +187,5 @@ miTriFan (CARD8 op,
tri->p3 = points[1];
}
(*ps->Triangles) (op, pSrc, pDst, maskFormat, xSrc, ySrc, ntri, tris);
- DEALLOCATE_LOCAL (tris);
+ xfree (tris);
}