From acf87144d019f18e646501657d9082c6eba77f54 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sun, 26 Jun 2016 01:38:22 +0200 Subject: nx-X11/programs/Xserver: Drop {X,x}free() macros, use free() instead. Fixes ArcticaProject/nx-libs#105 --- nx-X11/programs/Xserver/GL/glx/glximports.c | 4 ++-- nx-X11/programs/Xserver/GL/glx/glxscreens.c | 6 +++--- nx-X11/programs/Xserver/GL/glx/glxutil.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'nx-X11/programs/Xserver/GL/glx') diff --git a/nx-X11/programs/Xserver/GL/glx/glximports.c b/nx-X11/programs/Xserver/GL/glx/glximports.c index 435caca58..5b6c545fc 100644 --- a/nx-X11/programs/Xserver/GL/glx/glximports.c +++ b/nx-X11/programs/Xserver/GL/glx/glximports.c @@ -81,7 +81,7 @@ void *__glXImpCalloc(__GLcontext *gc, size_t numElements, size_t elementSize) void __glXImpFree(__GLcontext *gc, void *addr) { if (addr) { - xfree(addr); + free(addr); } } @@ -91,7 +91,7 @@ void *__glXImpRealloc(__GLcontext *gc, void *addr, size_t newSize) if (addr) { if (newSize == 0) { - xfree(addr); + free(addr); return NULL; } newAddr = xrealloc(addr, newSize); diff --git a/nx-X11/programs/Xserver/GL/glx/glxscreens.c b/nx-X11/programs/Xserver/GL/glx/glxscreens.c index 58b38b1a2..1cbc0baf7 100644 --- a/nx-X11/programs/Xserver/GL/glx/glxscreens.c +++ b/nx-X11/programs/Xserver/GL/glx/glxscreens.c @@ -366,9 +366,9 @@ void __glXScreenReset(void) __glXFree(__glXActiveScreens[i].GLXextensions); __glXFree(__glXActiveScreens[i].GLextensions); } - xfree(__glXActiveScreens); - xfree(__glXHyperpipeFuncs); - xfree(__glXSwapBarrierFuncs); + free(__glXActiveScreens); + free(__glXHyperpipeFuncs); + free(__glXSwapBarrierFuncs); __glXNumHyperpipeFuncs = 0; __glXNumSwapBarrierFuncs = 0; __glXHyperpipeFuncs = NULL; diff --git a/nx-X11/programs/Xserver/GL/glx/glxutil.c b/nx-X11/programs/Xserver/GL/glx/glxutil.c index 03bc19f63..cf0aae011 100644 --- a/nx-X11/programs/Xserver/GL/glx/glxutil.c +++ b/nx-X11/programs/Xserver/GL/glx/glxutil.c @@ -102,7 +102,7 @@ __glXRealloc(void *addr, size_t newSize) if (addr) { if (newSize == 0) { - xfree(addr); + free(addr); return NULL; } else { newAddr = xrealloc(addr, newSize); @@ -125,7 +125,7 @@ void __glXFree(void *addr) { if (addr) { - xfree(addr); + free(addr); } } -- cgit v1.2.3 From 2646fc254e75c4a7fc10d03d1139d0bd708ceae9 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sun, 26 Jun 2016 01:51:18 +0200 Subject: nx-X11/programs/Xserver: Drop {X,x}alloc() macros, use malloc() instead. --- nx-X11/programs/Xserver/GL/glx/glxcmds.c | 2 +- nx-X11/programs/Xserver/GL/glx/glximports.c | 6 +++--- nx-X11/programs/Xserver/GL/glx/glxutil.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'nx-X11/programs/Xserver/GL/glx') diff --git a/nx-X11/programs/Xserver/GL/glx/glxcmds.c b/nx-X11/programs/Xserver/GL/glx/glxcmds.c index c62585507..7d8fbe81f 100644 --- a/nx-X11/programs/Xserver/GL/glx/glxcmds.c +++ b/nx-X11/programs/Xserver/GL/glx/glxcmds.c @@ -2138,7 +2138,7 @@ int __glXQueryServerString(__GLXclientState *cl, GLbyte *pc) reply.length = length; reply.n = n; - if ((buf = (char *) Xalloc(length << 2)) == NULL) { + if ((buf = (char *) malloc(length << 2)) == NULL) { return BadAlloc; } __glXStrncpy(buf, ptr, n); diff --git a/nx-X11/programs/Xserver/GL/glx/glximports.c b/nx-X11/programs/Xserver/GL/glx/glximports.c index 5b6c545fc..b1245f900 100644 --- a/nx-X11/programs/Xserver/GL/glx/glximports.c +++ b/nx-X11/programs/Xserver/GL/glx/glximports.c @@ -50,7 +50,7 @@ void *__glXImpMalloc(__GLcontext *gc, size_t size) if (size == 0) { return NULL; } - addr = xalloc(size); + addr = malloc(size); if (addr == NULL) { /* XXX: handle out of memory error */ return NULL; @@ -67,7 +67,7 @@ void *__glXImpCalloc(__GLcontext *gc, size_t numElements, size_t elementSize) return NULL; } size = numElements * elementSize; - addr = xalloc(size); + addr = malloc(size); if (addr == NULL) { /* XXX: handle out of memory error */ return NULL; @@ -99,7 +99,7 @@ void *__glXImpRealloc(__GLcontext *gc, void *addr, size_t newSize) if (newSize == 0) { return NULL; } - newAddr = xalloc(newSize); + newAddr = malloc(newSize); } if (newAddr == NULL) { return NULL; /* XXX: out of memory error */ diff --git a/nx-X11/programs/Xserver/GL/glx/glxutil.c b/nx-X11/programs/Xserver/GL/glx/glxutil.c index cf0aae011..715bb5c99 100644 --- a/nx-X11/programs/Xserver/GL/glx/glxutil.c +++ b/nx-X11/programs/Xserver/GL/glx/glxutil.c @@ -68,7 +68,7 @@ __glXMalloc(size_t size) if (size == 0) { return NULL; } - addr = (void *) xalloc(size); + addr = (void *) malloc(size); if (addr == NULL) { /* XXX: handle out of memory error */ return NULL; @@ -86,7 +86,7 @@ __glXCalloc(size_t numElements, size_t elementSize) return NULL; } size = numElements * elementSize; - addr = (void *) xalloc(size); + addr = (void *) malloc(size); if (addr == NULL) { /* XXX: handle out of memory error */ return NULL; @@ -111,7 +111,7 @@ __glXRealloc(void *addr, size_t newSize) if (newSize == 0) { return NULL; } else { - newAddr = xalloc(newSize); + newAddr = malloc(newSize); } } if (newAddr == NULL) { -- cgit v1.2.3 From 74a5450bc058354e55c1589e64ef8e73775cebc4 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sun, 26 Jun 2016 02:08:32 +0200 Subject: nx-X11/programs/Xserver: Drop {X,x}realloc() macros, use realloc() instead. --- nx-X11/programs/Xserver/GL/glx/glximports.c | 2 +- nx-X11/programs/Xserver/GL/glx/glxutil.c | 2 +- nx-X11/programs/Xserver/GL/glx/unpack.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'nx-X11/programs/Xserver/GL/glx') diff --git a/nx-X11/programs/Xserver/GL/glx/glximports.c b/nx-X11/programs/Xserver/GL/glx/glximports.c index b1245f900..f966ca4df 100644 --- a/nx-X11/programs/Xserver/GL/glx/glximports.c +++ b/nx-X11/programs/Xserver/GL/glx/glximports.c @@ -94,7 +94,7 @@ void *__glXImpRealloc(__GLcontext *gc, void *addr, size_t newSize) free(addr); return NULL; } - newAddr = xrealloc(addr, newSize); + newAddr = realloc(addr, newSize); } else { if (newSize == 0) { return NULL; diff --git a/nx-X11/programs/Xserver/GL/glx/glxutil.c b/nx-X11/programs/Xserver/GL/glx/glxutil.c index 715bb5c99..b95a21f89 100644 --- a/nx-X11/programs/Xserver/GL/glx/glxutil.c +++ b/nx-X11/programs/Xserver/GL/glx/glxutil.c @@ -105,7 +105,7 @@ __glXRealloc(void *addr, size_t newSize) free(addr); return NULL; } else { - newAddr = xrealloc(addr, newSize); + newAddr = realloc(addr, newSize); } } else { if (newSize == 0) { diff --git a/nx-X11/programs/Xserver/GL/glx/unpack.h b/nx-X11/programs/Xserver/GL/glx/unpack.h index 94bdae8f9..d1150c32b 100644 --- a/nx-X11/programs/Xserver/GL/glx/unpack.h +++ b/nx-X11/programs/Xserver/GL/glx/unpack.h @@ -93,7 +93,7 @@ extern xGLXSingleReply __glXReply; else if ((size) > sizeof(answerBuffer)) { \ int bump; \ if ((cl)->returnBufSize < (size)+(align)) { \ - (cl)->returnBuf = (GLbyte*)Xrealloc((cl)->returnBuf, \ + (cl)->returnBuf = (GLbyte*)realloc((cl)->returnBuf, \ (size)+(align)); \ if (!(cl)->returnBuf) { \ return BadAlloc; \ -- cgit v1.2.3