diff options
author | Michel Dänzer <daenzer@vmware.com> | 2010-06-14 08:52:16 +0200 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2010-06-21 08:18:15 +0200 |
commit | f7a91ece264af9f3fd2fc18e99aefcda93ce9f5c (patch) | |
tree | dd5748ed2b94a860be6e66070e2c025cc9febad0 /src/radeon_video.c | |
parent | ea37d24b1b6d4cbcf73e680846de25b72af216e3 (diff) |
Convert x(c)alloc/xfree to m/calloc/free.
Fixes deprecation warnings with xserver master and should also work with older
xservers.
Diffstat (limited to 'src/radeon_video.c')
-rw-r--r-- | src/radeon_video.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/radeon_video.c b/src/radeon_video.c index 5e2a7238..dc752797 100644 --- a/src/radeon_video.c +++ b/src/radeon_video.c @@ -281,7 +281,7 @@ void RADEONInitVideo(ScreenPtr pScreen) return; num_adaptors = xf86XVListGenericAdaptors(pScrn, &adaptors); - newAdaptors = xalloc((num_adaptors + 2) * sizeof(XF86VideoAdaptorPtr *)); + newAdaptors = malloc((num_adaptors + 2) * sizeof(XF86VideoAdaptorPtr *)); if (newAdaptors == NULL) return; @@ -316,7 +316,7 @@ void RADEONInitVideo(ScreenPtr pScreen) xf86XVScreenInit(pScreen, adaptors, num_adaptors); if(newAdaptors) - xfree(newAdaptors); + free(newAdaptors); } @@ -1404,7 +1404,7 @@ static void RADEONSetupTheatre(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv) xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Unsupported reference clock frequency, Rage Theatre disabled\n"); t->theatre_num=-1; - xfree(pPriv->theatre); + free(pPriv->theatre); pPriv->theatre = NULL; return; } @@ -1423,9 +1423,9 @@ RADEONAllocAdaptor(ScrnInfoPtr pScrn) if(!(adapt = xf86XVAllocateVideoAdaptorRec(pScrn))) return NULL; - if(!(pPriv = xcalloc(1, sizeof(RADEONPortPrivRec) + sizeof(DevUnion)))) + if(!(pPriv = calloc(1, sizeof(RADEONPortPrivRec) + sizeof(DevUnion)))) { - xfree(adapt); + free(adapt); return NULL; } @@ -1538,7 +1538,7 @@ RADEONAllocAdaptor(ScrnInfoPtr pScrn) if(!xf86LoadSubModule(pScrn,"theatre")) { xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"Unable to load Rage Theatre module\n"); - xfree(pPriv->theatre); + free(pPriv->theatre); goto skip_theatre; } break; @@ -1548,7 +1548,7 @@ RADEONAllocAdaptor(ScrnInfoPtr pScrn) if(!xf86LoadSubModule(pScrn,"theatre200")) { xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"Unable to load Rage Theatre module\n"); - xfree(pPriv->theatre); + free(pPriv->theatre); goto skip_theatre; } pPriv->theatre->microc_path = info->RageTheatreMicrocPath; @@ -1558,7 +1558,7 @@ RADEONAllocAdaptor(ScrnInfoPtr pScrn) default: { xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"Unknown Theatre chip\n"); - xfree(pPriv->theatre); + free(pPriv->theatre); goto skip_theatre; } } @@ -1569,7 +1569,7 @@ RADEONAllocAdaptor(ScrnInfoPtr pScrn) xf86_InitTheatre(pPriv->theatre); if(pPriv->theatre->mode == MODE_UNINITIALIZED) { - Xfree(pPriv->theatre); + free(pPriv->theatre); pPriv->theatre = NULL; xf86DrvMsg(pScrn->scrnIndex,X_INFO,"Rage Theatre disabled\n"); /* Here the modules must be unloaded */ @@ -3192,18 +3192,18 @@ RADEONAllocateSurface( surface->width = w; surface->height = h; - if(!(surface->pitches = xalloc(sizeof(int)))) { + if(!(surface->pitches = malloc(sizeof(int)))) { radeon_legacy_free_memory(pScrn, surface_memory); return BadAlloc; } - if(!(surface->offsets = xalloc(sizeof(int)))) { - xfree(surface->pitches); + if(!(surface->offsets = malloc(sizeof(int)))) { + free(surface->pitches); radeon_legacy_free_memory(pScrn, surface_memory); return BadAlloc; } - if(!(pPriv = xalloc(sizeof(OffscreenPrivRec)))) { - xfree(surface->pitches); - xfree(surface->offsets); + if(!(pPriv = malloc(sizeof(OffscreenPrivRec)))) { + free(surface->pitches); + free(surface->offsets); radeon_legacy_free_memory(pScrn, surface_memory); return BadAlloc; } @@ -3247,9 +3247,9 @@ RADEONFreeSurface( RADEONStopSurface(surface); radeon_legacy_free_memory(pScrn, pPriv->surface_memory); pPriv->surface_memory = NULL; - xfree(surface->pitches); - xfree(surface->offsets); - xfree(surface->devPrivate.ptr); + free(surface->pitches); + free(surface->offsets); + free(surface->devPrivate.ptr); return Success; } @@ -3364,7 +3364,7 @@ RADEONInitOffscreenImages(ScreenPtr pScreen) XF86OffscreenImagePtr offscreenImages; /* need to free this someplace */ - if (!(offscreenImages = xalloc(sizeof(XF86OffscreenImageRec)))) + if (!(offscreenImages = malloc(sizeof(XF86OffscreenImageRec)))) return; offscreenImages[0].image = &Images[0]; |