summaryrefslogtreecommitdiff
path: root/src/mga_dri.c
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2011-09-26 22:22:09 -0400
committerMatt Turner <mattst88@gmail.com>2011-09-27 22:47:29 -0400
commitee09a9a340f8946f2d4a71a431b64189dbb5c256 (patch)
tree77a01d037b6d0f9a37b3729e00d587201d2e995e /src/mga_dri.c
parent94bbeb132c7eda912d1b402a1a91ca7cbbf5e6a1 (diff)
Remove xalloc/xcalloc/xrealloc/xfree
Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/mga_dri.c')
-rw-r--r--src/mga_dri.c70
1 files changed, 35 insertions, 35 deletions
diff --git a/src/mga_dri.c b/src/mga_dri.c
index 14f342f..957c6df 100644
--- a/src/mga_dri.c
+++ b/src/mga_dri.c
@@ -91,24 +91,24 @@ static Bool MGAInitVisualConfigs( ScreenPtr pScreen )
case 16:
numConfigs = 8;
- pConfigs = (__GLXvisualConfig*)xcalloc( sizeof(__GLXvisualConfig),
+ pConfigs = (__GLXvisualConfig*)calloc( sizeof(__GLXvisualConfig),
numConfigs );
if ( !pConfigs ) {
return FALSE;
}
- pMGAConfigs = (MGAConfigPrivPtr)xcalloc( sizeof(MGAConfigPrivRec),
+ pMGAConfigs = (MGAConfigPrivPtr)calloc( sizeof(MGAConfigPrivRec),
numConfigs );
if ( !pMGAConfigs ) {
- xfree( pConfigs );
+ free(pConfigs);
return FALSE;
}
- pMGAConfigPtrs = (MGAConfigPrivPtr*)xcalloc( sizeof(MGAConfigPrivPtr),
+ pMGAConfigPtrs = (MGAConfigPrivPtr*)calloc( sizeof(MGAConfigPrivPtr),
numConfigs );
if ( !pMGAConfigPtrs ) {
- xfree( pConfigs );
- xfree( pMGAConfigs );
+ free(pConfigs);
+ free(pMGAConfigs);
return FALSE;
}
@@ -182,24 +182,24 @@ static Bool MGAInitVisualConfigs( ScreenPtr pScreen )
case 32:
numConfigs = 8;
- pConfigs = (__GLXvisualConfig*)xcalloc( sizeof(__GLXvisualConfig),
+ pConfigs = (__GLXvisualConfig*)calloc( sizeof(__GLXvisualConfig),
numConfigs );
if ( !pConfigs ) {
return FALSE;
}
- pMGAConfigs = (MGAConfigPrivPtr)xcalloc( sizeof(MGAConfigPrivRec),
+ pMGAConfigs = (MGAConfigPrivPtr)calloc( sizeof(MGAConfigPrivRec),
numConfigs );
if ( !pMGAConfigs ) {
- xfree( pConfigs );
+ free(pConfigs);
return FALSE;
}
- pMGAConfigPtrs = (MGAConfigPrivPtr*)xcalloc( sizeof(MGAConfigPrivPtr),
+ pMGAConfigPtrs = (MGAConfigPrivPtr*)calloc( sizeof(MGAConfigPrivPtr),
numConfigs );
if ( !pMGAConfigPtrs ) {
- xfree( pConfigs );
- xfree( pMGAConfigs );
+ free(pConfigs);
+ free(pMGAConfigs);
return FALSE;
}
@@ -973,11 +973,11 @@ static void MGADRIMoveBuffersXAA(WindowPtr pParent, DDXPointRec ptOldOrg,
if (nbox>1) {
/* Keep ordering in each band, reverse order of bands */
- pboxNew1 = (BoxPtr)xalloc(sizeof(BoxRec)*nbox);
+ pboxNew1 = (BoxPtr)malloc(sizeof(BoxRec)*nbox);
if (!pboxNew1) return;
- pptNew1 = (DDXPointPtr)xalloc(sizeof(DDXPointRec)*nbox);
+ pptNew1 = (DDXPointPtr)malloc(sizeof(DDXPointRec)*nbox);
if (!pptNew1) {
- xfree(pboxNew1);
+ free(pboxNew1);
return;
}
pboxBase = pboxNext = pbox+nbox-1;
@@ -1008,14 +1008,14 @@ static void MGADRIMoveBuffersXAA(WindowPtr pParent, DDXPointRec ptOldOrg,
if (nbox > 1) {
/*reverse orderof rects in each band */
- pboxNew2 = (BoxPtr)xalloc(sizeof(BoxRec)*nbox);
- pptNew2 = (DDXPointPtr)xalloc(sizeof(DDXPointRec)*nbox);
+ pboxNew2 = (BoxPtr)malloc(sizeof(BoxRec)*nbox);
+ pptNew2 = (DDXPointPtr)malloc(sizeof(DDXPointRec)*nbox);
if (!pboxNew2 || !pptNew2) {
- if (pptNew2) xfree(pptNew2);
- if (pboxNew2) xfree(pboxNew2);
+ if (pptNew2) free(pptNew2);
+ if (pboxNew2) free(pboxNew2);
if (pboxNew1) {
- xfree(pptNew1);
- xfree(pboxNew1);
+ free(pptNew1);
+ free(pboxNew1);
}
return;
}
@@ -1066,12 +1066,12 @@ static void MGADRIMoveBuffersXAA(WindowPtr pParent, DDXPointRec ptOldOrg,
MGASelectBuffer(pScrn, MGA_FRONT);
if (pboxNew2) {
- xfree(pptNew2);
- xfree(pboxNew2);
+ free(pptNew2);
+ free(pboxNew2);
}
if (pboxNew1) {
- xfree(pptNew1);
- xfree(pboxNew1);
+ free(pptNew1);
+ free(pboxNew1);
}
pMga->AccelInfoRec->NeedToSync = TRUE;
@@ -1150,7 +1150,7 @@ Bool MGADRIScreenInit( ScreenPtr pScreen )
if (xf86LoaderCheckSymbol("DRICreatePCIBusID")) {
pDRIInfo->busIdString = DRICreatePCIBusID(pMga->PciInfo);
} else {
- pDRIInfo->busIdString = xalloc(64);
+ pDRIInfo->busIdString = malloc(64);
sprintf( pDRIInfo->busIdString, "PCI:%d:%d:%d",
#ifdef XSERVER_LIBPCIACCESS
((pMga->PciInfo->domain << 8) | pMga->PciInfo->bus),
@@ -1198,7 +1198,7 @@ Bool MGADRIScreenInit( ScreenPtr pScreen )
pDRIInfo->SAREASize = SAREA_MAX;
- pMGADRI = (MGADRIPtr)xcalloc( sizeof(MGADRIRec), 1 );
+ pMGADRI = (MGADRIPtr)calloc( sizeof(MGADRIRec), 1 );
if ( !pMGADRI ) {
DRIDestroyInfoRec( pMga->pDRIInfo );
pMga->pDRIInfo = 0;
@@ -1208,9 +1208,9 @@ Bool MGADRIScreenInit( ScreenPtr pScreen )
}
pMGADRIServer = (MGADRIServerPrivatePtr)
- xcalloc( sizeof(MGADRIServerPrivateRec), 1 );
+ calloc( sizeof(MGADRIServerPrivateRec), 1 );
if ( !pMGADRIServer ) {
- xfree( pMGADRI );
+ free( pMGADRI );
DRIDestroyInfoRec( pMga->pDRIInfo );
pMga->pDRIInfo = 0;
xf86DrvMsg( pScrn->scrnIndex, X_ERROR,
@@ -1249,9 +1249,9 @@ Bool MGADRIScreenInit( ScreenPtr pScreen )
pDRIInfo->bufferRequests = DRI_ALL_WINDOWS;
if ( !DRIScreenInit( pScreen, pDRIInfo, &pMga->drmFD ) ) {
- xfree( pMGADRIServer );
+ free( pMGADRIServer );
pMga->DRIServerInfo = 0;
- xfree( pDRIInfo->devPrivate );
+ free( pDRIInfo->devPrivate );
pDRIInfo->devPrivate = 0;
DRIDestroyInfoRec( pMga->pDRIInfo );
pMga->pDRIInfo = 0;
@@ -1495,20 +1495,20 @@ void MGADRICloseScreen( ScreenPtr pScreen )
if ( pMga->pDRIInfo ) {
if ( pMga->pDRIInfo->devPrivate ) {
- xfree( pMga->pDRIInfo->devPrivate );
+ free( pMga->pDRIInfo->devPrivate );
pMga->pDRIInfo->devPrivate = 0;
}
DRIDestroyInfoRec( pMga->pDRIInfo );
pMga->pDRIInfo = 0;
}
if ( pMga->DRIServerInfo ) {
- xfree( pMga->DRIServerInfo );
+ free(pMga->DRIServerInfo);
pMga->DRIServerInfo = 0;
}
if ( pMga->pVisualConfigs ) {
- xfree( pMga->pVisualConfigs );
+ free(pMga->pVisualConfigs);
}
if ( pMga->pVisualConfigsPriv ) {
- xfree( pMga->pVisualConfigsPriv );
+ free( pMga->pVisualConfigsPriv );
}
}