diff options
author | Adam Jackson <ajax@redhat.com> | 2008-12-19 09:51:52 -0500 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2008-12-19 09:51:52 -0500 |
commit | 5a072c55350f4b73d911ea6a2aeddad844924834 (patch) | |
tree | b18e8cffb91b7ef40c4331a306e716ba4b50f962 /hw/dmx/glxProxy | |
parent | 8c488ac3b3990cd203baed7f2127b9bed8aab534 (diff) |
dmx: Fix calloc macro confusion.
Diffstat (limited to 'hw/dmx/glxProxy')
-rw-r--r-- | hw/dmx/glxProxy/glxutil.c | 11 | ||||
-rw-r--r-- | hw/dmx/glxProxy/glxvisuals.c | 1 |
2 files changed, 7 insertions, 5 deletions
diff --git a/hw/dmx/glxProxy/glxutil.c b/hw/dmx/glxProxy/glxutil.c index 67ac822c6..70f8b74bb 100644 --- a/hw/dmx/glxProxy/glxutil.c +++ b/hw/dmx/glxProxy/glxutil.c @@ -34,6 +34,7 @@ #include <pixmapstr.h> #include <windowstr.h> #include "glxutil.h" +#include <stdlib.h> /************************************************************************/ @@ -51,7 +52,7 @@ __glXMalloc(size_t size) if (size == 0) { return NULL; } - addr = (void *) xalloc(size); + addr = malloc(size); if (addr == NULL) { /* XXX: handle out of memory error */ return NULL; @@ -68,7 +69,7 @@ __glXCalloc(size_t numElements, size_t elementSize) if ((numElements == 0) || (elementSize == 0)) { return NULL; } - addr = xcalloc(numElements, elementSize); + addr = calloc(numElements, elementSize); if (addr == NULL) { /* XXX: handle out of memory error */ return NULL; @@ -86,13 +87,13 @@ __glXRealloc(void *addr, size_t newSize) xfree(addr); return NULL; } else { - newAddr = xrealloc(addr, newSize); + newAddr = realloc(addr, newSize); } } else { if (newSize == 0) { return NULL; } else { - newAddr = xalloc(newSize); + newAddr = malloc(newSize); } } if (newAddr == NULL) { @@ -106,6 +107,6 @@ void __glXFree(void *addr) { if (addr) { - xfree(addr); + free(addr); } } diff --git a/hw/dmx/glxProxy/glxvisuals.c b/hw/dmx/glxProxy/glxvisuals.c index b961dfaef..898c6be7b 100644 --- a/hw/dmx/glxProxy/glxvisuals.c +++ b/hw/dmx/glxProxy/glxvisuals.c @@ -37,6 +37,7 @@ #include "glxserver.h" #include "glxutil.h" #include "dmx_glxvisuals.h" +#include <stdlib.h> static int numConfigs = 0; static __GLXvisualConfig *visualConfigs = NULL; |