diff options
author | Mikhail Gusarov <dottedmag@dottedmag.net> | 2010-05-06 01:44:06 +0700 |
---|---|---|
committer | Mikhail Gusarov <dottedmag@dottedmag.net> | 2010-05-13 00:22:37 +0700 |
commit | 3f3ff971ecff9936cebafc813af9193b97bba89c (patch) | |
tree | fdbbad794a42488b7ffe41eed7aba4e498335f55 /hw/xfree86/common/xf86DGA.c | |
parent | 96c7ab27c383ec767f62a7a11e5fd76f86363fbc (diff) |
Replace X-allocation functions with their C89 counterparts
The only remaining X-functions used in server are XNF*, the rest is converted to
plain alloc/calloc/realloc/free/strdup.
X* functions are still exported from server and x* macros are still defined in
header file, so both ABI and API are not affected by this change.
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'hw/xfree86/common/xf86DGA.c')
-rw-r--r-- | hw/xfree86/common/xf86DGA.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c index 794a13171..a51a754e4 100644 --- a/hw/xfree86/common/xf86DGA.c +++ b/hw/xfree86/common/xf86DGA.c @@ -124,7 +124,7 @@ DGAInit( if (!pScreenPriv) { - if(!(pScreenPriv = (DGAScreenPtr)xalloc(sizeof(DGAScreenRec)))) + if(!(pScreenPriv = (DGAScreenPtr)malloc(sizeof(DGAScreenRec)))) return FALSE; dixSetPrivate(&pScreen->devPrivates, DGAScreenKey, pScreenPriv); pScreenPriv->CloseScreen = pScreen->CloseScreen; @@ -235,8 +235,8 @@ FreeMarkedVisuals(ScreenPtr pScreen) prev->next = curr; else pScreenPriv->fakedVisuals = curr; - xfree(tmp->pVisual); - xfree(tmp); + free(tmp->pVisual); + free(tmp); } else { prev = curr; curr = curr->next; @@ -263,7 +263,7 @@ DGACloseScreen(int i, ScreenPtr pScreen) /* DGAShutdown() should have ensured that no DGA screen were active by here */ - xfree(pScreenPriv); + free(pScreenPriv); return((*pScreen->CloseScreen)(i, pScreen)); } @@ -363,7 +363,7 @@ xf86SetDGAMode( else (*pScreen->DestroyPixmap)(oldPix); } - xfree(pScreenPriv->current); + free(pScreenPriv->current); pScreenPriv->current = NULL; pScrn->vtSema = TRUE; (*pScreenPriv->funcs->SetMode)(pScrn, NULL); @@ -391,7 +391,7 @@ xf86SetDGAMode( else return BadValue; - if(!(device = (DGADevicePtr)xalloc(sizeof(DGADeviceRec)))) + if(!(device = (DGADevicePtr)malloc(sizeof(DGADeviceRec)))) return BadAlloc; if(!pScreenPriv->current) { @@ -403,7 +403,7 @@ xf86SetDGAMode( } if(!(*pScreenPriv->funcs->SetMode)(pScrn, pMode)) { - xfree(device); + free(device); return BadAlloc; } @@ -424,7 +424,7 @@ xf86SetDGAMode( else (*pScreen->DestroyPixmap)(oldPix); } - xfree(pScreenPriv->current); + free(pScreenPriv->current); pScreenPriv->current = NULL; } @@ -671,7 +671,7 @@ DGACreateColormap(int index, ClientPtr client, int id, int mode, int alloc) pMode = &(pScreenPriv->modes[mode - 1]); - if(!(pVisual = xalloc(sizeof(VisualRec)))) + if(!(pVisual = malloc(sizeof(VisualRec)))) return BadAlloc; pVisual->vid = FakeClientID(0); @@ -705,8 +705,8 @@ DGACreateColormap(int index, ClientPtr client, int id, int mode, int alloc) pVisual->offsetBlue = BitsClear(pVisual->blueMask); } - if(!(fvlp = xalloc(sizeof(FakedVisualList)))) { - xfree(pVisual); + if(!(fvlp = malloc(sizeof(FakedVisualList)))) { + free(pVisual); return BadAlloc; } |