summaryrefslogtreecommitdiff
path: root/mi/mipolycon.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 /mi/mipolycon.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 'mi/mipolycon.c')
-rw-r--r--mi/mipolycon.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/mi/mipolycon.c b/mi/mipolycon.c
index 79384881d..40671df16 100644
--- a/mi/mipolycon.c
+++ b/mi/mipolycon.c
@@ -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);
}