summaryrefslogtreecommitdiff
path: root/src/savage_video.c
diff options
context:
space:
mode:
authorTormod Volden <debian.tormod@gmail.com>2011-01-23 12:47:02 +0100
committerAlex Deucher <alexdeucher@gmail.com>2011-01-25 13:27:31 -0500
commit35d9734049a0f701d2c1f84f778f30816176d29e (patch)
treedc86115c7bd30d867c61b71cb4360b6088a4e2f8 /src/savage_video.c
parent0cbb6d275726aaed648b5ea4dcff45ce14388f91 (diff)
savage: Replace deprecated x(c)alloc/xfree with m/calloc/free
sed -i 's/xalloc/malloc/g; s/xcalloc/calloc/g; s/xfree/free/g' Also replace xrealloc with realloc.
Diffstat (limited to 'src/savage_video.c')
-rw-r--r--src/savage_video.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/savage_video.c b/src/savage_video.c
index 5ee98cb..86ae0cd 100644
--- a/src/savage_video.c
+++ b/src/savage_video.c
@@ -384,7 +384,7 @@ void SavageInitVideo(ScreenPtr pScreen)
adaptors = &newAdaptor;
} else {
newAdaptors = /* need to free this someplace */
- xalloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr*));
+ malloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr*));
if(newAdaptors) {
memcpy(newAdaptors, adaptors, num_adaptors *
sizeof(XF86VideoAdaptorPtr));
@@ -399,7 +399,7 @@ void SavageInitVideo(ScreenPtr pScreen)
xf86XVScreenInit(pScreen, adaptors, num_adaptors);
if(newAdaptors)
- xfree(newAdaptors);
+ free(newAdaptors);
if( newAdaptor )
{
@@ -884,7 +884,7 @@ SavageSetupImageVideo(ScreenPtr pScreen)
xf86ErrorFVerb(XVTRACE,"SavageSetupImageVideo\n");
- if(!(adapt = xcalloc(1, sizeof(XF86VideoAdaptorRec) +
+ if(!(adapt = calloc(1, sizeof(XF86VideoAdaptorRec) +
sizeof(SavagePortPrivRec) +
sizeof(DevUnion))))
return NULL;
@@ -2208,18 +2208,18 @@ SavageAllocateSurface(
surface->width = w;
surface->height = h;
- if(!(surface->pitches = xalloc(sizeof(int)))) {
+ if(!(surface->pitches = malloc(sizeof(int)))) {
SavageFreeMemory(pScrn, surface_memory);
return BadAlloc;
}
- if(!(surface->offsets = xalloc(sizeof(int)))) {
- xfree(surface->pitches);
+ if(!(surface->offsets = malloc(sizeof(int)))) {
+ free(surface->pitches);
SavageFreeMemory(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);
SavageFreeMemory(pScrn, surface_memory);
return BadAlloc;
}
@@ -2264,9 +2264,9 @@ SavageFreeSurface(
if(pPriv->isOn)
SavageStopSurface(surface);
SavageFreeMemory(pScrn, pPriv->surface_memory);
- xfree(surface->pitches);
- xfree(surface->offsets);
- xfree(surface->devPrivate.ptr);
+ free(surface->pitches);
+ free(surface->offsets);
+ free(surface->devPrivate.ptr);
return Success;
}
@@ -2359,7 +2359,7 @@ SavageInitOffscreenImages(ScreenPtr pScreen)
/* need to free this someplace */
if (!psav->offscreenImages) {
- if(!(offscreenImages = xalloc(sizeof(XF86OffscreenImageRec))))
+ if(!(offscreenImages = malloc(sizeof(XF86OffscreenImageRec))))
return;
psav->offscreenImages = offscreenImages;
} else {