From 3f3ff971ecff9936cebafc813af9193b97bba89c Mon Sep 17 00:00:00 2001 From: Mikhail Gusarov Date: Thu, 6 May 2010 01:44:06 +0700 Subject: 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 Reviewed-by: Peter Hutterer --- randr/rrinfo.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'randr/rrinfo.c') diff --git a/randr/rrinfo.c b/randr/rrinfo.c index 20066d5fc..fdf372607 100644 --- a/randr/rrinfo.c +++ b/randr/rrinfo.c @@ -55,10 +55,10 @@ RROldModeAdd (RROutputPtr output, RRScreenSizePtr size, int refresh) } if (output->numModes) - modes = xrealloc (output->modes, + modes = realloc(output->modes, (output->numModes + 1) * sizeof (RRModePtr)); else - modes = xalloc (sizeof (RRModePtr)); + modes = malloc(sizeof (RRModePtr)); if (!modes) { RRModeDestroy (mode); @@ -134,7 +134,7 @@ RRScanOldConfig (ScreenPtr pScreen, Rotation rotations) newMode = mode; } } - xfree (size->pRates); + free(size->pRates); } else { @@ -144,7 +144,7 @@ RRScanOldConfig (ScreenPtr pScreen, Rotation rotations) } } if (pScrPriv->nSizes) - xfree (pScrPriv->pSizes); + free(pScrPriv->pSizes); pScrPriv->pSizes = NULL; pScrPriv->nSizes = 0; @@ -279,7 +279,7 @@ RRRegisterSize (ScreenPtr pScreen, for (i = 0; i < pScrPriv->nSizes; i++) if (RRScreenSizeMatches (&tmp, &pScrPriv->pSizes[i])) return &pScrPriv->pSizes[i]; - pNew = xrealloc (pScrPriv->pSizes, + pNew = realloc(pScrPriv->pSizes, (pScrPriv->nSizes + 1) * sizeof (RRScreenSize)); if (!pNew) return 0; @@ -303,7 +303,7 @@ Bool RRRegisterRate (ScreenPtr pScreen, if (pSize->pRates[i].rate == rate) return TRUE; - pNew = xrealloc (pSize->pRates, + pNew = realloc(pSize->pRates, (pSize->nRates + 1) * sizeof (RRScreenRate)); if (!pNew) return FALSE; -- cgit v1.2.3