mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-30 21:53:25 +00:00
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:
parent
96c7ab27c3
commit
3f3ff971ec
345 changed files with 3011 additions and 3011 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue