From 5dfe7dbf6ed122fbbb758be7a5b7d78a199583c7 Mon Sep 17 00:00:00 2001 From: Frank Huang Date: Wed, 1 Sep 2010 10:30:35 +0800 Subject: Replace xalloc/xrealloc/xfree/xcalloc with malloc/realloc/free/calloc * Replace the deprecated functions with new ones Refer to "/xserver/include/os.h" Signed-off-by: Frank Huang --- src/lx_memory.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/lx_memory.c') diff --git a/src/lx_memory.c b/src/lx_memory.c index 41ac077..3de7886 100644 --- a/src/lx_memory.c +++ b/src/lx_memory.c @@ -69,7 +69,7 @@ GeodeFreeOffscreen(GeodeRec * pGeode, GeodeMemPtr ptr) if (ptr->next) ptr->next->prev = ptr->prev; - xfree(ptr); + free(ptr); } /* Allocate the "rest" of the offscreen memory - this is for @@ -83,7 +83,7 @@ GeodeAllocRemainder(GeodeRec * pGeode) GeodeMemPtr nptr, ptr = pGeode->offscreenList; if (!pGeode->offscreenList) { - pGeode->offscreenList = xcalloc(1, sizeof(*nptr)); + pGeode->offscreenList = calloc(1, sizeof(*nptr)); pGeode->offscreenList->offset = pGeode->offscreenStart; pGeode->offscreenList->size = pGeode->offscreenSize; pGeode->offscreenList->next = NULL; @@ -95,7 +95,7 @@ GeodeAllocRemainder(GeodeRec * pGeode) /* Go to the end of the list of allocated stuff */ for (; ptr->next; ptr = ptr->next) ; - nptr = xcalloc(1, sizeof(*nptr)); + nptr = calloc(1, sizeof(*nptr)); nptr->offset = ptr->offset + ptr->size; nptr->size = pGeode->offscreenSize - (nptr->offset - pGeode->offscreenStart); @@ -125,7 +125,7 @@ GeodeAllocOffscreen(GeodeRec * pGeode, int size, int align) offset = ALIGN(pGeode->offscreenStart, align); - pGeode->offscreenList = xcalloc(1, sizeof(*nptr)); + pGeode->offscreenList = calloc(1, sizeof(*nptr)); pGeode->offscreenList->offset = offset; pGeode->offscreenList->size = size; pGeode->offscreenList->next = NULL; @@ -149,7 +149,7 @@ GeodeAllocOffscreen(GeodeRec * pGeode, int size, int align) offset = ptr->offset + ptr->size; offset = ALIGN(ptr->offset + ptr->size, align); - nptr = xcalloc(1, sizeof(*nptr)); + nptr = calloc(1, sizeof(*nptr)); nptr->offset = offset; nptr->size = size; nptr->next = ptr->next; @@ -307,7 +307,7 @@ GeodeCloseOffscreen(ScrnInfoPtr pScrni) while (ptr) { nptr = ptr->next; - xfree(ptr); + free(ptr); ptr = nptr; } -- cgit v1.2.3