diff options
author | Frank Huang <frankr.huang@amd.com> | 2010-09-01 10:30:35 +0800 |
---|---|---|
committer | Martin-Éric Racine <q-funk@iki.fi> | 2010-09-01 16:41:51 +0300 |
commit | 5dfe7dbf6ed122fbbb758be7a5b7d78a199583c7 (patch) | |
tree | 997b1647330b8e5b4ba7d4e8cd48685accbd7b1f /src/lx_memory.c | |
parent | fc342655a3d928759467eac8c917effe8f283031 (diff) |
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 <frankr.huang@amd.com>
Diffstat (limited to 'src/lx_memory.c')
-rw-r--r-- | src/lx_memory.c | 12 |
1 files changed, 6 insertions, 6 deletions
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; } |