xserver: Branch 'master'
Adam Jackson
ajax at kemper.freedesktop.org
Fri Dec 19 06:52:23 PST 2008
hw/dmx/dmx.h | 6 +++---
hw/dmx/dmxextension.c | 14 ++++++++------
hw/dmx/glxProxy/glxutil.c | 11 ++++++-----
hw/dmx/glxProxy/glxvisuals.c | 1 +
4 files changed, 18 insertions(+), 14 deletions(-)
New commits:
commit 5a072c55350f4b73d911ea6a2aeddad844924834
Author: Adam Jackson <ajax at redhat.com>
Date: Fri Dec 19 09:51:52 2008 -0500
dmx: Fix calloc macro confusion.
diff --git a/hw/dmx/dmx.h b/hw/dmx/dmx.h
index 05e5fab..6ebd00e 100644
--- a/hw/dmx/dmx.h
+++ b/hw/dmx/dmx.h
@@ -341,21 +341,21 @@ do { \
#define _MAXSCREENSALLOCF(o,size,fatal) \
do { \
if (!o) { \
- o = xcalloc((size), sizeof(*(o))); \
+ o = calloc((size), sizeof(*(o))); \
if (!o && fatal) FatalError(MAXSCREEN_FAILED_TXT #o); \
} \
} while (0)
#define _MAXSCREENSALLOCR(o,size,retval) \
do { \
if (!o) { \
- o = xcalloc((size), sizeof(*(o))); \
+ o = calloc((size), sizeof(*(o))); \
if (!o) return retval; \
} \
} while (0)
#define MAXSCREENSFREE(o) \
do { \
- if (o) xfree(o); \
+ if (o) free(o); \
o = NULL; \
} while (0)
diff --git a/hw/dmx/dmxextension.c b/hw/dmx/dmxextension.c
index d20c844..d367f26 100644
--- a/hw/dmx/dmxextension.c
+++ b/hw/dmx/dmxextension.c
@@ -41,6 +41,8 @@
#include <dmx-config.h>
#endif
+#include <stdlib.h>
+
#include "dmx.h"
#include "dmxinit.h"
#include "dmxextension.h"
@@ -1121,9 +1123,9 @@ static void dmxBERestoreRenderGlyph(pointer value, XID id, pointer n)
}
/* Now allocate the memory we need */
- images = xcalloc(len_images, sizeof(char));
- gids = xalloc(glyphSet->hash.tableEntries*sizeof(Glyph));
- glyphs = xalloc(glyphSet->hash.tableEntries*sizeof(XGlyphInfo));
+ images = calloc(len_images, sizeof(char));
+ gids = malloc(glyphSet->hash.tableEntries*sizeof(Glyph));
+ glyphs = malloc(glyphSet->hash.tableEntries*sizeof(XGlyphInfo));
pos = images;
ctr = 0;
@@ -1158,9 +1160,9 @@ static void dmxBERestoreRenderGlyph(pointer value, XID id, pointer n)
len_images);
/* Clean up */
- xfree(len_images);
- xfree(gids);
- xfree(glyphs);
+ free(len_images);
+ free(gids);
+ free(glyphs);
}
#endif
diff --git a/hw/dmx/glxProxy/glxutil.c b/hw/dmx/glxProxy/glxutil.c
index 67ac822..70f8b74 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 b961dfa..898c6be 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;
More information about the xorg-commit
mailing list