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:
@@ -274,7 +274,7 @@ XaceCensorImage(
|
||||
|
||||
/* convert region to list-of-rectangles for PolyFillRect */
|
||||
|
||||
pRects = xalloc(nRects * sizeof(xRectangle));
|
||||
pRects = malloc(nRects * sizeof(xRectangle));
|
||||
if (!pRects)
|
||||
{
|
||||
failed = TRUE;
|
||||
@@ -326,7 +326,7 @@ XaceCensorImage(
|
||||
*/
|
||||
bzero(pBuf, (int)(widthBytesLine * h));
|
||||
}
|
||||
if (pRects) xfree(pRects);
|
||||
if (pRects) free(pRects);
|
||||
if (pScratchGC) FreeScratchGC(pScratchGC);
|
||||
if (pPix) FreeScratchPixmapHeader(pPix);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user