summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2011-10-19 00:29:27 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2011-10-19 00:29:27 -0700
commit11c189cd7b183561432736e4042f36c556de7a05 (patch)
tree484c39f3dc9878f43bec9f206e5c4a3325d96fc0
parent541d11934b86873382e14ac3c42ad52044fb5412 (diff)
Use malloc/calloc/realloc/free directly
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r--src/rendition.c12
-rw-r--r--src/vloaduc.c12
2 files changed, 12 insertions, 12 deletions
diff --git a/src/rendition.c b/src/rendition.c
index 7a9e18b..2d9c4c4 100644
--- a/src/rendition.c
+++ b/src/rendition.c
@@ -330,7 +330,7 @@ renditionProbe(DriverPtr drv, int flags)
renditionChipsets, renditionPCIchipsets,
devSections, numDevSections, drv, &usedChips);
- xfree(devSections);
+ free(devSections);
if (numUsed <= 0)
return FALSE;
@@ -359,7 +359,7 @@ renditionProbe(DriverPtr drv, int flags)
foundScreen=TRUE;
}
}
- xfree(usedChips);
+ free(usedChips);
}
return foundScreen;
}
@@ -400,7 +400,7 @@ renditionGetRec(ScrnInfoPtr pScreenInfo)
sleep(1);
#endif
if (!pScreenInfo->driverPrivate)
- pScreenInfo->driverPrivate=xcalloc(sizeof(renditionRec), 1);
+ pScreenInfo->driverPrivate=calloc(sizeof(renditionRec), 1);
/* perhaps some initialization? <ml> */
@@ -421,7 +421,7 @@ renditionFreeRec(ScrnInfoPtr pScreenInfo)
#endif
if (xf86LoaderCheckSymbol("vgaHWFreeHWRec"))
vgaHWFreeHWRec(pScreenInfo);
- xfree(pScreenInfo->driverPrivate);
+ free(pScreenInfo->driverPrivate);
pScreenInfo->driverPrivate=NULL;
#ifdef DEBUG
@@ -596,7 +596,7 @@ renditionPreInit(ScrnInfoPtr pScreenInfo, int flags)
/* collect all of the options flags and process them */
xf86CollectOptions(pScreenInfo, NULL);
- if (!(pRendition->Options = xalloc(sizeof(renditionOptions))))
+ if (!(pRendition->Options = malloc(sizeof(renditionOptions))))
return FALSE;
memcpy(pRendition->Options, renditionOptions, sizeof(renditionOptions));
xf86ProcessOptions(pScreenInfo->scrnIndex, pScreenInfo->options,
@@ -1167,7 +1167,7 @@ renditionScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
pRendition->board.shadowPitch
= BitmapBytePad(pScreenInfo->bitsPerPixel * width);
pRendition->board.shadowPtr
- = xalloc(pRendition->board.shadowPitch * height);
+ = malloc(pRendition->board.shadowPitch * height);
displayWidth = pRendition->board.shadowPitch
/ (pScreenInfo->bitsPerPixel >> 3);
FBBase = pRendition->board.shadowPtr;
diff --git a/src/vloaduc.c b/src/vloaduc.c
index 67bf901..5c6aab0 100644
--- a/src/vloaduc.c
+++ b/src/vloaduc.c
@@ -103,7 +103,7 @@ verite_load_ucfile(ScrnInfoPtr pScreenInfo, char *file_name)
sz=SW16(ehdr.e_phentsize);
num=SW16(ehdr.e_phnum);
if (0!=sz && 0!=num) {
- orig_pphdr=pphdr=(Elf32_Phdr *)xalloc(sz*num);
+ orig_pphdr=pphdr=(Elf32_Phdr *)malloc(sz*num);
if (!pphdr) {
ErrorF("RENDITION: Cannot allocate global memory (1)\n");
close(fd);
@@ -125,7 +125,7 @@ verite_load_ucfile(ScrnInfoPtr pScreenInfo, char *file_name)
sz=SW16(ehdr.e_shentsize);
num=SW16(ehdr.e_shnum);
if (0!=sz && 0!=num) {
- orig_pshdr=pshdr=(Elf32_Shdr *)xalloc(sz*num);
+ orig_pshdr=pshdr=(Elf32_Shdr *)malloc(sz*num);
if (!pshdr) {
ErrorF("RENDITION: Cannot allocate global memory (2)\n");
close(fd);
@@ -148,7 +148,7 @@ verite_load_ucfile(ScrnInfoPtr pScreenInfo, char *file_name)
loadSegment2board(pScreenInfo, fd, pphdr);
pphdr=(Elf32_Phdr *)(((char *)pphdr)+sz);
} while (--num);
- xfree(orig_pphdr);
+ free(orig_pphdr);
}
else {
do {
@@ -158,7 +158,7 @@ verite_load_ucfile(ScrnInfoPtr pScreenInfo, char *file_name)
loadSection2board(pScreenInfo, fd, pshdr);
pshdr=(Elf32_Shdr *)(((char *)pshdr)+sz);
} while (--num) ;
- xfree(orig_pshdr);
+ free(orig_pshdr);
}
close(fd);
@@ -195,7 +195,7 @@ loadSegment2board(ScrnInfoPtr pScreenInfo, int fd, Elf32_Phdr *phdr)
return;
}
- data=(vu8 *)xalloc(size);
+ data=(vu8 *)malloc(size);
if (NULL == data){
ErrorF("RENDITION: GlobalAllocPtr couldn't allocate %lx bytes",
(unsigned long)size);
@@ -210,7 +210,7 @@ loadSegment2board(ScrnInfoPtr pScreenInfo, int fd, Elf32_Phdr *phdr)
mmve(pScreenInfo, size, data, physAddr);
- xfree(data);
+ free(data);
}