summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/xvmc
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/gallium/state_trackers/xvmc
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/gallium/state_trackers/xvmc')
-rw-r--r--src/gallium/state_trackers/xvmc/context.c2
-rw-r--r--src/gallium/state_trackers/xvmc/subpicture.c4
-rw-r--r--src/gallium/state_trackers/xvmc/tests/test_subpicture.c2
-rw-r--r--src/gallium/state_trackers/xvmc/tests/testlib.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/state_trackers/xvmc/context.c b/src/gallium/state_trackers/xvmc/context.c
index 366f29bcdfa..23f9d10ca92 100644
--- a/src/gallium/state_trackers/xvmc/context.c
+++ b/src/gallium/state_trackers/xvmc/context.c
@@ -113,7 +113,7 @@ static Status Validate(Display *dpy, XvPortID port, int surface_type_id,
*mc_type, *surface_flags, *subpic_max_w, *subpic_max_h);
}
- XFree(surface_info);
+ free(surface_info);
}
}
diff --git a/src/gallium/state_trackers/xvmc/subpicture.c b/src/gallium/state_trackers/xvmc/subpicture.c
index b33f16e6a31..f9f646b7496 100644
--- a/src/gallium/state_trackers/xvmc/subpicture.c
+++ b/src/gallium/state_trackers/xvmc/subpicture.c
@@ -116,7 +116,7 @@ static Status Validate(Display *dpy, XvPortID port, int surface_type_id, int xvi
subpictures = XvMCListSubpictureTypes(dpy, port, surface_type_id, &num_subpics);
if (num_subpics < 1) {
if (subpictures)
- XFree(subpictures);
+ free(subpictures);
return BadMatch;
}
if (!subpictures)
@@ -161,7 +161,7 @@ static Status Validate(Display *dpy, XvPortID port, int surface_type_id, int xvi
}
}
- XFree(subpictures);
+ free(subpictures);
return i < num_subpics ? Success : BadMatch;
}
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);
}
}
}