summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/x11/fakeglx.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/mesa/drivers/x11/fakeglx.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/mesa/drivers/x11/fakeglx.c')
-rw-r--r--src/mesa/drivers/x11/fakeglx.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c
index c30ba04a01c..d5a59b4566c 100644
--- a/src/mesa/drivers/x11/fakeglx.c
+++ b/src/mesa/drivers/x11/fakeglx.c
@@ -201,7 +201,7 @@ GetOverlayInfo(Display *dpy, int screen, int *numOverlays)
if (status != Success || actualType != overlayVisualsAtom ||
actualFormat != 32 || sizeData < 4) {
/* something went wrong */
- XFree((void *) ovInfo);
+ free((void *) ovInfo);
*numOverlays = 0;
return NULL;
}
@@ -239,18 +239,18 @@ level_of_visual( Display *dpy, XVisualInfo *vinfo )
/* found the visual */
if (/*ov->transparent_type==1 &&*/ ov->layer!=0) {
int level = ov->layer;
- XFree((void *) overlay_info);
+ free((void *) overlay_info);
return level;
}
else {
- XFree((void *) overlay_info);
+ free((void *) overlay_info);
return 0;
}
}
}
/* The visual ID was not found in the overlay list. */
- XFree((void *) overlay_info);
+ free((void *) overlay_info);
return 0;
}
@@ -497,19 +497,19 @@ transparent_pixel( XMesaVisual glxvis )
/* found it! */
if (ov->transparent_type == 0) {
/* type 0 indicates no transparency */
- XFree((void *) overlay_info);
+ free((void *) overlay_info);
return -1;
}
else {
/* ov->value is the transparent pixel */
- XFree((void *) overlay_info);
+ free((void *) overlay_info);
return ov->value;
}
}
}
/* The visual ID was not found in the overlay list. */
- XFree((void *) overlay_info);
+ free((void *) overlay_info);
return -1;
}
@@ -554,7 +554,7 @@ get_visual( Display *dpy, int scr, unsigned int depth, int xclass )
return vis;
}
else {
- XFree((void *) vis);
+ free((void *) vis);
return NULL;
}
}
@@ -780,7 +780,7 @@ choose_x_overlay_visual( Display *dpy, int scr,
if (deepvis==NULL || vislist->depth > deepest) {
/* YES! found a satisfactory visual */
if (deepvis) {
- XFree( deepvis );
+ free(deepvis);
}
deepest = vislist->depth;
deepvis = vislist;