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>
This commit is contained in:
Mikhail Gusarov 2010-05-06 01:44:06 +07:00
commit 3f3ff971ec
345 changed files with 3011 additions and 3011 deletions

View file

@ -105,12 +105,12 @@ miFillConvexPoly(
dy = ymax - ymin + 1;
if ((count < 3) || (dy < 0))
return(TRUE);
ptsOut = FirstPoint = xalloc(sizeof(DDXPointRec)*dy);
width = FirstWidth = xalloc(sizeof(int) * dy);
ptsOut = FirstPoint = malloc(sizeof(DDXPointRec)*dy);
width = FirstWidth = malloc(sizeof(int) * dy);
if(!FirstPoint || !FirstWidth)
{
if (FirstWidth) xfree(FirstWidth);
if (FirstPoint) xfree(FirstPoint);
if (FirstWidth) free(FirstWidth);
if (FirstPoint) free(FirstPoint);
return(FALSE);
}
@ -175,8 +175,8 @@ miFillConvexPoly(
/* in case we're called with non-convex polygon */
if(i < 0)
{
xfree(FirstWidth);
xfree(FirstPoint);
free(FirstWidth);
free(FirstPoint);
return(TRUE);
}
while (i-- > 0)
@ -210,8 +210,8 @@ miFillConvexPoly(
(*pgc->ops->FillSpans)(dst, pgc,
ptsOut-FirstPoint,FirstPoint,FirstWidth,
1);
xfree(FirstWidth);
xfree(FirstPoint);
free(FirstWidth);
free(FirstPoint);
return(TRUE);
}