diff options
author | Matt Turner <[email protected]> | 2012-09-04 22:52:36 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2012-09-05 22:28:49 -0700 |
commit | 7c7b7b068b1d0dc8e14b87dab5dbd4108f874f74 (patch) | |
tree | 9a6901c4b12cd5b2dbe3c7fce29cfcc7771a84de /src/glx/xfont.c | |
parent | 17a574d7cd8c541c902cc0da40362a32d965e77b (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/xfont.c')
-rw-r--r-- | src/glx/xfont.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/glx/xfont.c b/src/glx/xfont.c index 4ca2c8f868f..065938f0504 100644 --- a/src/glx/xfont.c +++ b/src/glx/xfont.c @@ -245,7 +245,7 @@ DRI_glXUseXFont(struct glx_context *CC, Font font, int first, int count, int lis max_bm_width = (max_width + 7) / 8; max_bm_height = max_height; - bm = (GLubyte *) Xmalloc((max_bm_width * max_bm_height) * sizeof(GLubyte)); + bm = (GLubyte *) malloc((max_bm_width * max_bm_height) * sizeof(GLubyte)); if (!bm) { XFreeFontInfo(NULL, fs, 1); __glXSetError(CC, GL_OUT_OF_MEMORY); @@ -359,7 +359,7 @@ DRI_glXUseXFont(struct glx_context *CC, Font font, int first, int count, int lis glEndList(); } - Xfree(bm); + free(bm); XFreeFontInfo(NULL, fs, 1); XFreeGC(dpy, gc); |