diff options
author | Andrew Gregory <andrew.gregory.8@gmail.com> | 2014-08-01 14:19:48 -0700 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2014-08-04 14:23:58 +1000 |
commit | f4992960ad4a325184802a47dc23d53d15be452f (patch) | |
tree | 3f9f0eac128b3ca99ec410e68b696a8ec897b277 /lib/libalpm | |
parent | 0c43198ee0817d7acea47ea5d15b4704db78308f (diff) |
deps.c: use alpm_list_find_ptr
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r-- | lib/libalpm/deps.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c index adbccd1e..c5acfc95 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 */ |