aboutsummaryrefslogtreecommitdiffstats
path: root/src/glx/render2.c
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2012-09-04 22:52:36 -0700
committerMatt Turner <[email protected]>2012-09-05 22:28:49 -0700
commit7c7b7b068b1d0dc8e14b87dab5dbd4108f874f74 (patch)
tree9a6901c4b12cd5b2dbe3c7fce29cfcc7771a84de /src/glx/render2.c
parent17a574d7cd8c541c902cc0da40362a32d965e77b (diff)
Remove Xcalloc/Xmalloc/Xfree calls
These calls allowed Xlib to use a custom memory allocator, but Xlib has used the standard C library functions since at least its initial import into git in 2003. It seems unlikely that it will grow a custom memory allocator. The functions now just add extra overhead. Replacing them will make future Coccinelle patches simpler. This patch has been generated by the following Coccinelle semantic patch: // Remove Xcalloc/Xmalloc/Xfree calls @@ expression E1, E2; @@ - Xcalloc (E1, E2) + calloc (E1, E2) @@ expression E; @@ - Xmalloc (E) + malloc (E) @@ expression E; @@ - Xfree (E) + free (E) @@ expression E; @@ - XFree (E) + free (E) Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/glx/render2.c')
-rw-r--r--src/glx/render2.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/glx/render2.c b/src/glx/render2.c
index 762950f4ac4..870f0611186 100644
--- a/src/glx/render2.c
+++ b/src/glx/render2.c
@@ -89,14 +89,14 @@ __indirect_glMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride,
if (stride != k) {
GLubyte *buf;
- buf = (GLubyte *) Xmalloc(compsize);
+ buf = (GLubyte *) malloc(compsize);
if (!buf) {
__glXSetError(gc, GL_OUT_OF_MEMORY);
return;
}
__glFillMap1d(k, order, stride, pnts, buf);
__glXSendLargeCommand(gc, pc, 32, buf, compsize);
- Xfree((char *) buf);
+ free((char *) buf);
}
else {
/* Data is already packed. Just send it out */
@@ -152,14 +152,14 @@ __indirect_glMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride,
if (stride != k) {
GLubyte *buf;
- buf = (GLubyte *) Xmalloc(compsize);
+ buf = (GLubyte *) malloc(compsize);
if (!buf) {
__glXSetError(gc, GL_OUT_OF_MEMORY);
return;
}
__glFillMap1f(k, order, stride, pnts, buf);
__glXSendLargeCommand(gc, pc, 24, buf, compsize);
- Xfree((char *) buf);
+ free((char *) buf);
}
else {
/* Data is already packed. Just send it out */
@@ -227,7 +227,7 @@ __indirect_glMap2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustr,
if ((vstr != k) || (ustr != k * vord)) {
GLdouble *buf;
- buf = (GLdouble *) Xmalloc(compsize);
+ buf = (GLdouble *) malloc(compsize);
if (!buf) {
__glXSetError(gc, GL_OUT_OF_MEMORY);
return;
@@ -237,7 +237,7 @@ __indirect_glMap2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustr,
*/
__glFillMap2d(k, uord, vord, ustr, vstr, pnts, buf);
__glXSendLargeCommand(gc, pc, 52, buf, compsize);
- Xfree((char *) buf);
+ free((char *) buf);
}
else {
/* Data is already packed. Just send it out */
@@ -303,7 +303,7 @@ __indirect_glMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustr,
if ((vstr != k) || (ustr != k * vord)) {
GLfloat *buf;
- buf = (GLfloat *) Xmalloc(compsize);
+ buf = (GLfloat *) malloc(compsize);
if (!buf) {
__glXSetError(gc, GL_OUT_OF_MEMORY);
return;
@@ -313,7 +313,7 @@ __indirect_glMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustr,
*/
__glFillMap2f(k, uord, vord, ustr, vstr, pnts, buf);
__glXSendLargeCommand(gc, pc, 36, buf, compsize);
- Xfree((char *) buf);
+ free((char *) buf);
}
else {
/* Data is already packed. Just send it out */