diff options
author | Daniel Stone <daniel@fooishbar.org> | 2007-11-05 14:18:22 +0000 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2007-11-05 14:34:46 +0000 |
commit | 934281126f6c602fa4bd0c2e29d8c9f44fe532b8 (patch) | |
tree | 90ae5f5a9d43a266d8ba361764370e6874f079c7 /Xext/shape.c | |
parent | fb32bb9839b615f7297fbfac2050bc216682f01c (diff) |
Xext: Remove usage of alloca
Replace with heap allocations.
Diffstat (limited to 'Xext/shape.c')
-rw-r--r-- | Xext/shape.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Xext/shape.c b/Xext/shape.c index 928eeee31..6515a10d7 100644 --- a/Xext/shape.c +++ b/Xext/shape.c @@ -1060,7 +1060,7 @@ ProcShapeGetRectangles (client) } if (!region) { nrects = 1; - rects = (xRectangle *) ALLOCATE_LOCAL (sizeof (xRectangle)); + rects = (xRectangle *) xalloc (sizeof (xRectangle)); if (!rects) return BadAlloc; switch (stuff->kind) { @@ -1087,7 +1087,7 @@ ProcShapeGetRectangles (client) BoxPtr box; nrects = REGION_NUM_RECTS(region); box = REGION_RECTS(region); - rects = (xRectangle *) ALLOCATE_LOCAL (nrects * sizeof (xRectangle)); + rects = (xRectangle *) xalloc (nrects * sizeof (xRectangle)); if (!rects && nrects) return BadAlloc; for (i = 0; i < nrects; i++, box++) { @@ -1110,7 +1110,7 @@ ProcShapeGetRectangles (client) } WriteToClient (client, sizeof (rep), (char *) &rep); WriteToClient (client, nrects * sizeof (xRectangle), (char *) rects); - DEALLOCATE_LOCAL (rects); + xfree (rects); return client->noClientException; } |