summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyu.z.wang@intel.com>2007-11-28 22:13:55 +0800
committerZhenyu Wang <zhenyu.z.wang@intel.com>2007-11-28 22:13:55 +0800
commit75ef3e669dac1259d282dcc8f54b197fc19f22b3 (patch)
treeeca3913c500995a424d0d70f5111892cf563cdd9 /src
parent7f9cefffbf44a2d07b51cc13aaf2d54fcd8f2f22 (diff)
Replace ALLOCATE_LOCAL/DEALLOCATE_LOCAL with xalloc/xfree
Diffstat (limited to 'src')
-rw-r--r--src/i810_dri.c28
-rw-r--r--src/i830_dri.c28
2 files changed, 28 insertions, 28 deletions
diff --git a/src/i810_dri.c b/src/i810_dri.c
index e5e15651..136a7056 100644
--- a/src/i810_dri.c
+++ b/src/i810_dri.c
@@ -1208,7 +1208,7 @@ I810DRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg,
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
I810Ptr pI810 = I810PTR(pScrn);
BoxPtr pboxTmp, pboxNext, pboxBase;
- DDXPointPtr pptTmp, pptNew2;
+ DDXPointPtr pptTmp, pptNew2 = NULL;
int xdir, ydir;
int screenwidth = pScrn->virtualX;
@@ -1231,12 +1231,12 @@ I810DRIMoveBuffers(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;
@@ -1267,16 +1267,16 @@ I810DRIMoveBuffers(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;
}
@@ -1341,12 +1341,12 @@ I810DRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg,
I810EmitFlush(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);
}
if (pI810->AccelInfoRec)
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);
}