diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2011-11-05 14:40:52 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2011-11-05 14:40:52 +0000 |
commit | 9ac35490fe0d68c070fc59a40b4bc959bb484120 (patch) | |
tree | 4363465547ce55117e19f429ed5940e28eed9581 /driver | |
parent | bec0f4257b2cbbb19bcc75ed85423565b540ed02 (diff) |
Replace deprecated xalloc/xfree with malloc/free.
Diffstat (limited to 'driver')
-rw-r--r-- | driver/xf86-video-wsfb/src/wsfb_driver.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/driver/xf86-video-wsfb/src/wsfb_driver.c b/driver/xf86-video-wsfb/src/wsfb_driver.c index 69b69b26e..8e76f8dca 100644 --- a/driver/xf86-video-wsfb/src/wsfb_driver.c +++ b/driver/xf86-video-wsfb/src/wsfb_driver.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsfb_driver.c,v 1.23 2010/08/29 15:20:40 matthieu Exp $ */ +/* $OpenBSD: wsfb_driver.c,v 1.24 2011/11/05 14:40:51 matthieu Exp $ */ /* * Copyright (c) 2001 Matthieu Herrb * All rights reserved. @@ -277,7 +277,7 @@ WsfbFreeRec(ScrnInfoPtr pScrn) if (pScrn->driverPrivate == NULL) return; - xfree(pScrn->driverPrivate); + free(pScrn->driverPrivate); pScrn->driverPrivate = NULL; } @@ -391,7 +391,7 @@ WsfbProbe(DriverPtr drv, int flags) } } } - xfree(devSections); + free(devSections); TRACE("probe done"); return foundScreen; } @@ -538,27 +538,27 @@ WsfbPreInit(ScrnInfoPtr pScrn, int flags) */ if (fPtr->info.cmsize != 0) { fPtr->saved_cmap.red = - (unsigned char *)xalloc(fPtr->info.cmsize); + (unsigned char *)malloc(fPtr->info.cmsize); if (fPtr->saved_cmap.red == NULL) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Cannot malloc %d bytes\n", fPtr->info.cmsize); return FALSE; } fPtr->saved_cmap.green = - (unsigned char *)xalloc(fPtr->info.cmsize); + (unsigned char *)malloc(fPtr->info.cmsize); if (fPtr->saved_cmap.green == NULL) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Cannot malloc %d bytes\n", fPtr->info.cmsize); - xfree(fPtr->saved_cmap.red); + free(fPtr->saved_cmap.red); return FALSE; } fPtr->saved_cmap.blue = - (unsigned char *)xalloc(fPtr->info.cmsize); + (unsigned char *)malloc(fPtr->info.cmsize); if (fPtr->saved_cmap.blue == NULL) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Cannot malloc %d bytes\n", fPtr->info.cmsize); - xfree(fPtr->saved_cmap.red); - xfree(fPtr->saved_cmap.green); + free(fPtr->saved_cmap.red); + free(fPtr->saved_cmap.green); return FALSE; } } @@ -663,7 +663,8 @@ WsfbPreInit(ScrnInfoPtr pScrn, int flags) /* Handle options. */ xf86CollectOptions(pScrn, NULL); - if (!(fPtr->Options = xalloc(sizeof(WsfbOptions)))) + fPtr->Options = (OptionInfoRec *)malloc(sizeof(WsfbOptions)); + if (fPtr->Options == NULL) return FALSE; memcpy(fPtr->Options, WsfbOptions, sizeof(WsfbOptions)); xf86ProcessOptions(pScrn->scrnIndex, fPtr->pEnt->device->options, @@ -714,7 +715,7 @@ WsfbPreInit(ScrnInfoPtr pScrn, int flags) } /* Fake video mode struct. */ - mode = (DisplayModePtr)xalloc(sizeof(DisplayModeRec)); + mode = (DisplayModePtr)malloc(sizeof(DisplayModeRec)); mode->prev = mode; mode->next = mode; mode->name = "wsfb current mode"; @@ -918,7 +919,7 @@ WsfbScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) fPtr->fbstart = fPtr->fbmem; if (fPtr->shadowFB) { - fPtr->shadow = xcalloc(1, pScrn->virtualX * pScrn->virtualY * + fPtr->shadow = calloc(1, pScrn->virtualX * pScrn->virtualY * pScrn->bitsPerPixel/8); if (!fPtr->shadow) { @@ -1081,7 +1082,7 @@ WsfbCloseScreen(int scrnIndex, ScreenPtr pScreen) } #ifdef XFreeXDGA if (fPtr->pDGAMode) { - xfree(fPtr->pDGAMode); + free(fPtr->pDGAMode); fPtr->pDGAMode = NULL; fPtr->nDGAMode = 0; } @@ -1413,7 +1414,7 @@ WsfbDGAAddModes(ScrnInfoPtr pScrn) DGAModePtr pDGAMode; do { - pDGAMode = xrealloc(fPtr->pDGAMode, + pDGAMode = realloc(fPtr->pDGAMode, (fPtr->nDGAMode + 1) * sizeof(DGAModeRec)); if (!pDGAMode) break; |