diff options
author | Daniel Stone <daniel@fooishbar.org> | 2007-11-05 14:18:35 +0000 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2007-11-05 14:34:47 +0000 |
commit | 1eb6a1d0d2817cd0ce96fb27db3ceb2d0ff024af (patch) | |
tree | 38e30de52f8f89eaf1c10c5c77f0e346b2d5dfe1 /XTrap | |
parent | 934281126f6c602fa4bd0c2e29d8c9f44fe532b8 (diff) |
XTrap: Remove usage of alloca
Replace with xalloc/xfree.
Diffstat (limited to 'XTrap')
-rw-r--r-- | XTrap/xtrapdi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/XTrap/xtrapdi.c b/XTrap/xtrapdi.c index 23d3bde7f..80124fa73 100644 --- a/XTrap/xtrapdi.c +++ b/XTrap/xtrapdi.c @@ -2030,7 +2030,7 @@ static void GetSendColorCellsRep(ClientPtr client, xResourceReq *req) } nmasks = creq->planes; length = ((long)npixels + (long)nmasks) * sizeof(Pixel); - data = (XETrapDatum *)ALLOCATE_LOCAL(sizeof(XETrapDatum)+length); + data = (XETrapDatum *)xalloc(sizeof(XETrapDatum)+length); if (!data) { SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, @@ -2048,7 +2048,7 @@ static void GetSendColorCellsRep(ClientPtr client, xResourceReq *req) { SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, req->reqType, 0L, retval); - DEALLOCATE_LOCAL(data); + xfree(data); return; } crep = (xAllocColorCellsReply *)&(data->u.reply); @@ -2073,7 +2073,7 @@ static void GetSendColorCellsRep(ClientPtr client, xResourceReq *req) SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, req->reqType, 0L, XETrapErrorBase + BadIO); } - DEALLOCATE_LOCAL(data); + xfree(data); } static void GetSendColorPlanesRep(ClientPtr client, xResourceReq *req) { /* adapted from ProcAllocColorPlanes() in dispatch.c */ @@ -2101,7 +2101,7 @@ static void GetSendColorPlanesRep(ClientPtr client, xResourceReq *req) return; } length = (long)npixels * sizeof(Pixel); - data = (XETrapDatum *)ALLOCATE_LOCAL(sizeof(XETrapDatum)+length); + data = (XETrapDatum *)xalloc(sizeof(XETrapDatum)+length); if (!data) { SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, @@ -2121,7 +2121,7 @@ static void GetSendColorPlanesRep(ClientPtr client, xResourceReq *req) { SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, req->reqType, 0L, retval); - DEALLOCATE_LOCAL(data); + xfree(data); return; } crep->nPixels = npixels; @@ -2146,6 +2146,6 @@ static void GetSendColorPlanesRep(ClientPtr client, xResourceReq *req) SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, req->reqType, 0L, XETrapErrorBase + BadIO); } - DEALLOCATE_LOCAL(data); + xfree(data); } #endif /* COLOR_REPLIES */ |