7222836
From 8ea9f03ea3c4d2f80f487c2474699beaf71e010c Mon Sep 17 00:00:00 2001
7222836
From: Fedora X Ninjas <x@fedoraproject.org>
7222836
Date: Fri, 19 Dec 2008 14:36:31 +1000
7222836
Subject: [PATCH] dmx: Death to xcalloc
7222836
7222836
dmx' hilarious circular inclusion of server-side and client-side headers means
7222836
xcalloc resolves to Xcalloc. Stop this. We've grown up now and can use calloc
7222836
directly.
7222836
---
7222836
 hw/dmx/dmx.h              |    4 ++--
7222836
 hw/dmx/dmxextension.c     |    2 +-
7222836
 hw/dmx/glxProxy/glxutil.c |    4 ++--
7222836
 3 files changed, 5 insertions(+), 5 deletions(-)
7222836
7222836
diff --git a/hw/dmx/dmx.h b/hw/dmx/dmx.h
7222836
index 05e5fab..1a71417 100644
7222836
--- a/hw/dmx/dmx.h
7222836
+++ b/hw/dmx/dmx.h
7222836
@@ -341,14 +341,14 @@ do {									\
7222836
 #define _MAXSCREENSALLOCF(o,size,fatal)                                 \
7222836
     do {                                                                \
7222836
         if (!o) {                                                       \
7222836
-            o = xcalloc((size), sizeof(*(o)));                          \
7222836
+            o = calloc((size), sizeof(*(o)));                          \
7222836
             if (!o && fatal) FatalError(MAXSCREEN_FAILED_TXT #o);       \
7222836
         }                                                               \
7222836
     } while (0)
7222836
 #define _MAXSCREENSALLOCR(o,size,retval)                                \
7222836
     do {                                                                \
7222836
         if (!o) {                                                       \
7222836
-            o = xcalloc((size), sizeof(*(o)));                          \
7222836
+            o = calloc((size), sizeof(*(o)));                          \
7222836
             if (!o) return retval;                                      \
7222836
         }                                                               \
7222836
     } while (0)
7222836
diff --git a/hw/dmx/dmxextension.c b/hw/dmx/dmxextension.c
7222836
index d20c844..6fd02dc 100644
7222836
--- a/hw/dmx/dmxextension.c
7222836
+++ b/hw/dmx/dmxextension.c
7222836
@@ -1121,7 +1121,7 @@ static void dmxBERestoreRenderGlyph(pointer value, XID id, pointer n)
7222836
     }
7222836
 
7222836
     /* Now allocate the memory we need */
7222836
-    images = xcalloc(len_images, sizeof(char));
7222836
+    images = calloc(len_images, sizeof(char));
7222836
     gids   = xalloc(glyphSet->hash.tableEntries*sizeof(Glyph));
7222836
     glyphs = xalloc(glyphSet->hash.tableEntries*sizeof(XGlyphInfo));
7222836
 
7222836
diff --git a/hw/dmx/glxProxy/glxutil.c b/hw/dmx/glxProxy/glxutil.c
7222836
index 080992e..53b02a6 100644
7222836
--- a/hw/dmx/glxProxy/glxutil.c
7222836
+++ b/hw/dmx/glxProxy/glxutil.c
7222836
@@ -69,7 +69,7 @@ __glXCalloc(size_t numElements, size_t elementSize)
7222836
     if ((numElements == 0) || (elementSize == 0)) {
7222836
 	return NULL;
7222836
     }
7222836
-    addr = xcalloc(numElements, elementSize);
7222836
+    addr = calloc(numElements, elementSize);
7222836
     if (addr == NULL) {
7222836
 	/* XXX: handle out of memory error */
7222836
 	return NULL;
7222836
@@ -87,7 +87,7 @@ __glXRealloc(void *addr, size_t newSize)
7222836
 	    xfree(addr);
7222836
 	    return NULL;
7222836
 	} else {
7222836
-	    newAddr = xrealloc(addr, newSize);
7222836
+	    newAddr = realloc(addr, newSize);
7222836
 	}
7222836
     } else {
7222836
 	if (newSize == 0) {
7222836
-- 
7222836
1.6.0.4
7222836