summaryrefslogtreecommitdiff
path: root/Xext/shape.c
diff options
context:
space:
mode:
authorMikhail Gusarov <dottedmag@dottedmag.net>2010-05-06 01:44:06 +0700
committerMikhail Gusarov <dottedmag@dottedmag.net>2010-05-13 00:22:37 +0700
commit3f3ff971ecff9936cebafc813af9193b97bba89c (patch)
treefdbbad794a42488b7ffe41eed7aba4e498335f55 /Xext/shape.c
parent96c7ab27c383ec767f62a7a11e5fd76f86363fbc (diff)
Replace X-allocation functions with their C89 counterparts
The only remaining X-functions used in server are XNF*, the rest is converted to plain alloc/calloc/realloc/free/strdup. X* functions are still exported from server and x* macros are still defined in header file, so both ABI and API are not affected by this change. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'Xext/shape.c')
-rw-r--r--Xext/shape.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/Xext/shape.c b/Xext/shape.c
index 58b5c23c0..f21d633c9 100644
--- a/Xext/shape.c
+++ b/Xext/shape.c
@@ -764,7 +764,7 @@ ShapeFreeClient (pointer data, XID id)
*pHead = pShapeEvent->next;
}
}
- xfree ((pointer) pShapeEvent);
+ free((pointer) pShapeEvent);
return 1;
}
@@ -778,9 +778,9 @@ ShapeFreeEvents (pointer data, XID id)
for (pCur = *pHead; pCur; pCur = pNext) {
pNext = pCur->next;
FreeResource (pCur->clientResource, ClientType);
- xfree ((pointer) pCur);
+ free((pointer) pCur);
}
- xfree ((pointer) pHead);
+ free((pointer) pHead);
return 1;
}
@@ -817,7 +817,7 @@ ProcShapeSelectInput (ClientPtr client)
}
/* build the entry */
- pNewShapeEvent = xalloc (sizeof (ShapeEventRec));
+ pNewShapeEvent = malloc(sizeof (ShapeEventRec));
if (!pNewShapeEvent)
return BadAlloc;
pNewShapeEvent->next = 0;
@@ -839,7 +839,7 @@ ProcShapeSelectInput (ClientPtr client)
*/
if (!pHead)
{
- pHead = xalloc (sizeof (ShapeEventPtr));
+ pHead = malloc(sizeof (ShapeEventPtr));
if (!pHead ||
!AddResource (pWin->drawable.id, ShapeEventType, (pointer)pHead))
{
@@ -866,7 +866,7 @@ ProcShapeSelectInput (ClientPtr client)
pNewShapeEvent->next = pShapeEvent->next;
else
*pHead = pShapeEvent->next;
- xfree (pShapeEvent);
+ free(pShapeEvent);
}
}
break;
@@ -1030,7 +1030,7 @@ ProcShapeGetRectangles (ClientPtr client)
}
if (!region) {
nrects = 1;
- rects = xalloc (sizeof (xRectangle));
+ rects = malloc(sizeof (xRectangle));
if (!rects)
return BadAlloc;
switch (stuff->kind) {
@@ -1057,7 +1057,7 @@ ProcShapeGetRectangles (ClientPtr client)
BoxPtr box;
nrects = REGION_NUM_RECTS(region);
box = REGION_RECTS(region);
- rects = xalloc (nrects * sizeof (xRectangle));
+ rects = malloc(nrects * sizeof (xRectangle));
if (!rects && nrects)
return BadAlloc;
for (i = 0; i < nrects; i++, box++) {
@@ -1080,7 +1080,7 @@ ProcShapeGetRectangles (ClientPtr client)
}
WriteToClient (client, sizeof (rep), (char *) &rep);
WriteToClient (client, nrects * sizeof (xRectangle), (char *) rects);
- xfree (rects);
+ free(rects);
return client->noClientException;
}