diff options
author | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2007-11-28 22:13:55 +0800 |
---|---|---|
committer | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2007-11-28 22:13:55 +0800 |
commit | 75ef3e669dac1259d282dcc8f54b197fc19f22b3 (patch) | |
tree | eca3913c500995a424d0d70f5111892cf563cdd9 /src/i830_dri.c | |
parent | 7f9cefffbf44a2d07b51cc13aaf2d54fcd8f2f22 (diff) |
Replace ALLOCATE_LOCAL/DEALLOCATE_LOCAL with xalloc/xfree
Diffstat (limited to 'src/i830_dri.c')
-rw-r--r-- | src/i830_dri.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/i830_dri.c b/src/i830_dri.c index b223b02e..f52a7c3d 100644 --- a/src/i830_dri.c +++ b/src/i830_dri.c @@ -1249,7 +1249,7 @@ I830DRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg, ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; I830Ptr pI830 = I830PTR(pScrn); BoxPtr pboxTmp, pboxNext, pboxBase; - DDXPointPtr pptTmp, pptNew2; + DDXPointPtr pptTmp, pptNew2 = NULL; int xdir, ydir; #if 0 @@ -1277,12 +1277,12 @@ I830DRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg, if (nbox > 1) { /* Keep ordering in each band, reverse order of bands */ - pboxNew1 = (BoxPtr) ALLOCATE_LOCAL(sizeof(BoxRec) * nbox); + pboxNew1 = (BoxPtr) xalloc(sizeof(BoxRec) * nbox); if (!pboxNew1) return; - pptNew1 = (DDXPointPtr) ALLOCATE_LOCAL(sizeof(DDXPointRec) * nbox); + pptNew1 = (DDXPointPtr) xalloc(sizeof(DDXPointRec) * nbox); if (!pptNew1) { - DEALLOCATE_LOCAL(pboxNew1); + xfree(pboxNew1); return; } pboxBase = pboxNext = pbox + nbox - 1; @@ -1313,16 +1313,16 @@ I830DRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg, if (nbox > 1) { /*reverse orderof rects in each band */ - pboxNew2 = (BoxPtr) ALLOCATE_LOCAL(sizeof(BoxRec) * nbox); - pptNew2 = (DDXPointPtr) ALLOCATE_LOCAL(sizeof(DDXPointRec) * nbox); + pboxNew2 = (BoxPtr) xalloc(sizeof(BoxRec) * nbox); + pptNew2 = (DDXPointPtr) xalloc(sizeof(DDXPointRec) * nbox); if (!pboxNew2 || !pptNew2) { if (pptNew2) - DEALLOCATE_LOCAL(pptNew2); + xfree(pptNew2); if (pboxNew2) - DEALLOCATE_LOCAL(pboxNew2); + xfree(pboxNew2); if (pboxNew1) { - DEALLOCATE_LOCAL(pptNew1); - DEALLOCATE_LOCAL(pboxNew1); + xfree(pptNew1); + xfree(pboxNew1); } return; } @@ -1393,12 +1393,12 @@ I830DRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg, I830EmitFlush(pScrn); if (pboxNew2) { - DEALLOCATE_LOCAL(pptNew2); - DEALLOCATE_LOCAL(pboxNew2); + xfree(pptNew2); + xfree(pboxNew2); } if (pboxNew1) { - DEALLOCATE_LOCAL(pptNew1); - DEALLOCATE_LOCAL(pboxNew1); + xfree(pptNew1); + xfree(pboxNew1); } i830MarkSync(pScrn); } |