From 7c7b7b068b1d0dc8e14b87dab5dbd4108f874f74 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Tue, 4 Sep 2012 22:52:36 -0700 Subject: 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 --- src/gallium/state_trackers/xvmc/tests/test_subpicture.c | 2 +- src/gallium/state_trackers/xvmc/tests/testlib.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gallium/state_trackers/xvmc/tests') diff --git a/src/gallium/state_trackers/xvmc/tests/test_subpicture.c b/src/gallium/state_trackers/xvmc/tests/test_subpicture.c index 9683a1a2a44..9336bfac446 100644 --- a/src/gallium/state_trackers/xvmc/tests/test_subpicture.c +++ b/src/gallium/state_trackers/xvmc/tests/test_subpicture.c @@ -174,7 +174,7 @@ int main(int argc, char **argv) assert(XvMCDestroyContext(display, &context) == Success); - XFree(subpics); + free(subpics); XvUngrabPort(display, port_num, CurrentTime); XCloseDisplay(display); diff --git a/src/gallium/state_trackers/xvmc/tests/testlib.c b/src/gallium/state_trackers/xvmc/tests/testlib.c index 86d4b1c6c28..de3b8da7787 100644 --- a/src/gallium/state_trackers/xvmc/tests/testlib.c +++ b/src/gallium/state_trackers/xvmc/tests/testlib.c @@ -102,7 +102,7 @@ int GetPort } } - XFree(surface_info); + free(surface_info); } } } -- cgit v1.2.3