diff options
author | Jeremy Huddleston <jeremyhu@apple.com> | 2011-10-29 19:53:16 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@apple.com> | 2011-10-29 19:53:16 -0700 |
commit | 9d552e5d9edfdda14cb1f4cfcf4197307d4e4a54 (patch) | |
tree | 6355aea3c6e105260609d7299918fe826985d76d | |
parent | 8b2e9978f408701f9aebc5678e63e7dfea145f34 (diff) |
Use malloc/calloc/realloc/free directly
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r-- | src/leo_checks.c | 8 | ||||
-rw-r--r-- | src/leo_driver.c | 10 | ||||
-rw-r--r-- | src/leo_fspans.c | 12 | ||||
-rw-r--r-- | src/leo_fspanssp.c | 12 |
4 files changed, 21 insertions, 21 deletions
diff --git a/src/leo_checks.c b/src/leo_checks.c index 7872083..ae250c3 100644 --- a/src/leo_checks.c +++ b/src/leo_checks.c @@ -137,14 +137,14 @@ LeoCheckFill (GCPtr pGC, DrawablePtr pDrawable) if (pGC->fillStyle == FillSolid) { if (gcPriv->stipple) { - xfree (gcPriv->stipple); + free (gcPriv->stipple); gcPriv->stipple = 0; } return TRUE; } if (!(stipple = gcPriv->stipple)) { if (!pLeo->tmpStipple) { - pLeo->tmpStipple = (LeoStipplePtr) xalloc (sizeof *pLeo->tmpStipple); + pLeo->tmpStipple = (LeoStipplePtr) malloc (sizeof *pLeo->tmpStipple); if (!pLeo->tmpStipple) return FALSE; } @@ -157,7 +157,7 @@ LeoCheckFill (GCPtr pGC, DrawablePtr pDrawable) case FillTiled: if (!LeoCheckTile (pGC->tile.pixmap, stipple, xrot, yrot)) { if (gcPriv->stipple) { - xfree (gcPriv->stipple); + free (gcPriv->stipple); gcPriv->stipple = 0; } return FALSE; @@ -168,7 +168,7 @@ LeoCheckFill (GCPtr pGC, DrawablePtr pDrawable) case FillOpaqueStippled: if (!LeoCheckStipple (pGC->stipple, stipple, xrot, yrot)) { if (gcPriv->stipple) { - xfree (gcPriv->stipple); + free (gcPriv->stipple); gcPriv->stipple = 0; } return FALSE; diff --git a/src/leo_driver.c b/src/leo_driver.c index 664e645..d509f44 100644 --- a/src/leo_driver.c +++ b/src/leo_driver.c @@ -171,7 +171,7 @@ LeoFreeRec(ScrnInfoPtr pScrn) pLeo = GET_LEO_FROM_SCRN(pScrn); - xfree(pScrn->driverPrivate); + free(pScrn->driverPrivate); pScrn->driverPrivate = NULL; return; @@ -241,7 +241,7 @@ LeoProbe(DriverPtr drv, int flags) devSections, numDevSections, drv, &usedChips); - xfree(devSections); + free(devSections); if (numUsed <= 0) return FALSE; @@ -275,9 +275,9 @@ LeoProbe(DriverPtr drv, int flags) xf86AddEntityToScreen(pScrn, pEnt->index); foundScreen = TRUE; } - xfree(pEnt); + free(pEnt); } - xfree(usedChips); + free(usedChips); return foundScreen; } @@ -352,7 +352,7 @@ LeoPreInit(ScrnInfoPtr pScrn, int flags) /* Collect all of the relevant option flags (fill in pScrn->options) */ xf86CollectOptions(pScrn, NULL); /* Process the options */ - if (!(pLeo->Options = xalloc(sizeof(LeoOptions)))) + if (!(pLeo->Options = malloc(sizeof(LeoOptions)))) return FALSE; memcpy(pLeo->Options, LeoOptions, sizeof(LeoOptions)); xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pLeo->Options); diff --git a/src/leo_fspans.c b/src/leo_fspans.c index eb0b227..816351e 100644 --- a/src/leo_fspans.c +++ b/src/leo_fspans.c @@ -67,11 +67,11 @@ LeoFillSpansSolid (DrawablePtr pDrawable, GCPtr pGC, } else { int nTmp = n * miFindMaxBand(clip); - pwidthFree = (int *)xalloc(nTmp * sizeof(int)); - pptFree = (DDXPointRec *)xalloc(nTmp * sizeof(DDXPointRec)); + pwidthFree = (int *)malloc(nTmp * sizeof(int)); + pptFree = (DDXPointRec *)malloc(nTmp * sizeof(DDXPointRec)); if (!pptFree || !pwidthFree) { - if (pptFree) xfree(pptFree); - if (pwidthFree) xfree(pwidthFree); + if (pptFree) free(pptFree); + if (pwidthFree) free(pwidthFree); return; } n = miClipSpans(clip, @@ -122,8 +122,8 @@ LeoFillSpansSolid (DrawablePtr pDrawable, GCPtr pGC, } if (numRects != 1) { - xfree(pptFree); - xfree(pwidthFree); + free(pptFree); + free(pwidthFree); } if (pGC->alu != GXcopy) ld0->rop = LEO_ATTR_RGBE_ENABLE|LEO_ROP_NEW; diff --git a/src/leo_fspanssp.c b/src/leo_fspanssp.c index 618e94d..958e61b 100644 --- a/src/leo_fspanssp.c +++ b/src/leo_fspanssp.c @@ -68,11 +68,11 @@ LeoFillSpansStippled (DrawablePtr pDrawable, GCPtr pGC, } else { int nTmp = n * miFindMaxBand(clip); - pwidthFree = (int *)xalloc(nTmp * sizeof(int)); - pptFree = (DDXPointRec *)xalloc(nTmp * sizeof(DDXPointRec)); + pwidthFree = (int *)malloc(nTmp * sizeof(int)); + pptFree = (DDXPointRec *)malloc(nTmp * sizeof(DDXPointRec)); if (!pptFree || !pwidthFree) { - if (pptFree) xfree(pptFree); - if (pwidthFree) xfree(pwidthFree); + if (pptFree) free(pptFree); + if (pwidthFree) free(pwidthFree); return; } n = miClipSpans(clip, @@ -160,8 +160,8 @@ LeoFillSpansStippled (DrawablePtr pDrawable, GCPtr pGC, } if (numRects != 1) { - xfree(pptFree); - xfree(pwidthFree); + free(pptFree); + free(pwidthFree); } if (pGC->alu != GXcopy) ld0->rop = LEO_ATTR_RGBE_ENABLE|LEO_ROP_NEW; |