diff options
author | Jeremy Huddleston <jeremyhu@apple.com> | 2011-10-17 01:42:00 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@apple.com> | 2011-10-17 01:42:00 -0700 |
commit | 80f60e4af0e0b124335c5a09cad0b1eb42583536 (patch) | |
tree | 7abed526380f140db6ccacce4c10c24b75b8dc4b | |
parent | 3e5ebc4c1b9c2f751e50415b0d1bbb670c659eac (diff) |
Use malloc/calloc/realloc/free directly
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r-- | src/alp_driver.c | 10 | ||||
-rw-r--r-- | src/cir_dga.c | 4 | ||||
-rw-r--r-- | src/cir_driver.c | 4 | ||||
-rw-r--r-- | src/lg_driver.c | 8 |
4 files changed, 13 insertions, 13 deletions
diff --git a/src/alp_driver.c b/src/alp_driver.c index d73eab8..edcaef3 100644 --- a/src/alp_driver.c +++ b/src/alp_driver.c @@ -246,7 +246,7 @@ AlpFreeRec(ScrnInfoPtr pScrn) { if (pScrn->driverPrivate == NULL) return; - xfree(pScrn->driverPrivate); + free(pScrn->driverPrivate); pScrn->driverPrivate = NULL; } @@ -485,7 +485,7 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags) /* Get the entity, and make sure it is PCI. */ pCir->pEnt = xf86GetEntityInfo(pScrn->entityList[0]); if (pCir->pEnt->location.type != BUS_PCI) { - xfree(pCir->pEnt); + free(pCir->pEnt); return FALSE; } @@ -572,7 +572,7 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags) xf86CollectOptions(pScrn, NULL); /* Process the options */ - if (!(pCir->Options = xalloc(sizeof(CirOptions)))) + if (!(pCir->Options = malloc(sizeof(CirOptions)))) return FALSE; memcpy(pCir->Options, CirOptions, sizeof(CirOptions)); xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pCir->Options); @@ -1487,7 +1487,7 @@ AlpScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) if(pCir->shadowFB) { pCir->ShadowPitch = BitmapBytePad(pScrn->bitsPerPixel * width); - pCir->ShadowPtr = xalloc(pCir->ShadowPitch * height); + pCir->ShadowPtr = malloc(pCir->ShadowPitch * height); displayWidth = pCir->ShadowPitch / (pScrn->bitsPerPixel >> 3); FbBase = pCir->ShadowPtr; } else { @@ -1811,7 +1811,7 @@ AlpCloseScreen(int scrnIndex, ScreenPtr pScreen) xf86DestroyCursorInfoRec(pCir->CursorInfoRec); pCir->CursorInfoRec = NULL; if (pCir->DGAModes) - xfree(pCir->DGAModes); + free(pCir->DGAModes); pCir->DGAnumModes = 0; pCir->DGAModes = NULL; diff --git a/src/cir_dga.c b/src/cir_dga.c index de2e38c..f930231 100644 --- a/src/cir_dga.c +++ b/src/cir_dga.c @@ -82,9 +82,9 @@ CirDGAInit(ScreenPtr pScreen) if (!pCir->DGAnumModes) { pMode = firstMode = pScrn->modes; while (pMode) { - newmodes = xrealloc(modes, (num + 1) * sizeof (DGAModeRec)); + newmodes = realloc(modes, (num + 1) * sizeof (DGAModeRec)); if (!newmodes) { - xfree(modes); + free(modes); return FALSE; } modes = newmodes; diff --git a/src/cir_driver.c b/src/cir_driver.c index fe75cb8..e427700 100644 --- a/src/cir_driver.c +++ b/src/cir_driver.c @@ -236,7 +236,7 @@ CIRProbe(DriverPtr drv, int flags) CIRChipsets, CIRPciChipsets, devSections, numDevSections, drv, &usedChips); /* Free it since we don't need that list after this */ - xfree(devSections); + free(devSections); if (numUsed <= 0) return FALSE; if (flags & PROBE_DETECT) @@ -278,7 +278,7 @@ CIRProbe(DriverPtr drv, int flags) pScrn->Probe = NULL; } } - xfree(usedChips); + free(usedChips); return foundScreen; } diff --git a/src/lg_driver.c b/src/lg_driver.c index 718454a..0f9f1f6 100644 --- a/src/lg_driver.c +++ b/src/lg_driver.c @@ -258,7 +258,7 @@ LgFreeRec(ScrnInfoPtr pScrn) { if (pScrn->driverPrivate == NULL) return; - xfree(pScrn->driverPrivate); + free(pScrn->driverPrivate); pScrn->driverPrivate = NULL; } @@ -453,7 +453,7 @@ LgPreInit(ScrnInfoPtr pScrn, int flags) xf86CollectOptions(pScrn, NULL); /* Process the options */ - if (!(pCir->Options = xalloc(sizeof(LgOptions)))) + if (!(pCir->Options = malloc(sizeof(LgOptions)))) return FALSE; memcpy(pCir->Options, LgOptions, sizeof(LgOptions)); xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pCir->Options); @@ -1313,7 +1313,7 @@ LgScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) if(pCir->shadowFB) { pCir->ShadowPitch = BitmapBytePad(pScrn->bitsPerPixel * width); - pCir->ShadowPtr = xalloc(pCir->ShadowPitch * height); + pCir->ShadowPtr = malloc(pCir->ShadowPitch * height); displayWidth = pCir->ShadowPitch / (pScrn->bitsPerPixel >> 3); FbBase = pCir->ShadowPtr; } else { @@ -1616,7 +1616,7 @@ LgCloseScreen(int scrnIndex, ScreenPtr pScreen) xf86DestroyCursorInfoRec(pCir->CursorInfoRec); pCir->CursorInfoRec = NULL; if (pCir->DGAModes) - xfree(pCir->DGAModes); + free(pCir->DGAModes); pCir->DGAnumModes = 0; pCir->DGAModes = NULL; |