Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-10-25 00:53:21 +0300
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-10-25 03:38:07 +0300
commit7c8fcbbde3a299096974f9061c8b5be0e526f4c2 (patch)
tree3321e27447af0c3b29aaba3b98d423d3bb7664bf /libavutil/tree.c
parent94f333f9dcfb4ed13d08e17949f7a929a1ece4b1 (diff)
avutil/tree: add additional const qualifier to the comparator
libc's qsort comparator has a const qualifier on both arguments. This adds a missing const qualifier to exactly match the comparator API. Existing usages of av_tree_find, av_tree_insert are appropriately modified: type signature changes of the comparators, and removal of unnecessary void * casts of function pointers. Reviewed-by: Henrik Gramner <henrik@gramner.com> Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Diffstat (limited to 'libavutil/tree.c')
-rw-r--r--libavutil/tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavutil/tree.c b/libavutil/tree.c
index d0b67efc5d..0a69ea9fc4 100644
--- a/libavutil/tree.c
+++ b/libavutil/tree.c
@@ -37,7 +37,7 @@ struct AVTreeNode *av_tree_node_alloc(void)
}
void *av_tree_find(const AVTreeNode *t, void *key,
- int (*cmp)(void *key, const void *b), void *next[2])
+ int (*cmp)(const void *key, const void *b), void *next[2])
{
if (t) {
unsigned int v = cmp(key, t->elem);
@@ -57,7 +57,7 @@ void *av_tree_find(const AVTreeNode *t, void *key,
}
void *av_tree_insert(AVTreeNode **tp, void *key,
- int (*cmp)(void *key, const void *b), AVTreeNode **next)
+ int (*cmp)(const void *key, const void *b), AVTreeNode **next)
{
AVTreeNode *t = *tp;
if (t) {