Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> --- lib/libalpm/deps.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c index adbccd1..c5acfc9 100644 --- a/lib/libalpm/deps.c +++ b/lib/libalpm/deps.c @@ -90,11 +90,6 @@ static alpm_pkg_t *find_dep_satisfier(alpm_list_t *pkgs, alpm_depend_t *dep) return NULL; } -static int ptr_cmp(const void *p, const void *q) -{ - return (p != q); -} - /* Convert a list of alpm_pkg_t * to a graph structure, * with a edge for each dependency. * Returns a list of vertices (one vertex = one package) @@ -201,14 +196,14 @@ alpm_list_t *_alpm_sortbydeps(alpm_handle_t *handle, /* child is an ancestor of vertex */ alpm_graph_t *transvertex = vertex; - if(!alpm_list_find(targets, nextchild->data, ptr_cmp)) { + if(!alpm_list_find_ptr(targets, nextchild->data)) { /* child is not part of the transaction, not a problem */ continue; } /* find the nearest parent that's part of the transaction */ while(transvertex) { - if(alpm_list_find(targets, transvertex->data, ptr_cmp)) { + if(alpm_list_find_ptr(targets, transvertex->data)) { break; } transvertex = transvertex->parent; @@ -234,7 +229,7 @@ alpm_list_t *_alpm_sortbydeps(alpm_handle_t *handle, } } if(!found) { - if(alpm_list_find(targets, vertex->data, ptr_cmp)) { + if(alpm_list_find_ptr(targets, vertex->data)) { newtargs = alpm_list_add(newtargs, vertex->data); } /* mark that we've left this vertex */ -- 2.0.2