Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/deps.c
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2013-10-25 23:20:24 -0400
committerAllan McRae <allan@archlinux.org>2013-10-31 16:20:03 +1000
commitc3493360afdc4e74558f1a8016cdb3164f9dbc8f (patch)
tree1529b260773bda789916d23f89094c196c22ec61 /lib/libalpm/deps.c
parent08191b13f2911b5f371824fbc224fe66c336bc76 (diff)
deps.c: pass alpm_list** to _alpm_recursedeps
Improves consistency and makes it clear that targs will be modified by _alpm_recursedeps. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/deps.c')
-rw-r--r--lib/libalpm/deps.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c
index 9761b2cb..dd85a014 100644
--- a/lib/libalpm/deps.c
+++ b/lib/libalpm/deps.c
@@ -589,7 +589,7 @@ static int can_remove_package(alpm_db_t *db, alpm_pkg_t *pkg,
* @param include_explicit if 0, explicitly installed packages are not included
* @return 0 on success, -1 on errors
*/
-int _alpm_recursedeps(alpm_db_t *db, alpm_list_t *targs, int include_explicit)
+int _alpm_recursedeps(alpm_db_t *db, alpm_list_t **targs, int include_explicit)
{
alpm_list_t *i, *j;
@@ -597,12 +597,12 @@ int _alpm_recursedeps(alpm_db_t *db, alpm_list_t *targs, int include_explicit)
return -1;
}
- for(i = targs; i; i = i->next) {
+ for(i = *targs; i; i = i->next) {
alpm_pkg_t *pkg = i->data;
for(j = _alpm_db_get_pkgcache(db); j; j = j->next) {
alpm_pkg_t *deppkg = j->data;
if(_alpm_pkg_depends_on(pkg, deppkg)
- && can_remove_package(db, deppkg, targs, include_explicit)) {
+ && can_remove_package(db, deppkg, *targs, include_explicit)) {
alpm_pkg_t *copy;
_alpm_log(db->handle, ALPM_LOG_DEBUG, "adding '%s' to the targets\n",
deppkg->name);
@@ -610,7 +610,7 @@ int _alpm_recursedeps(alpm_db_t *db, alpm_list_t *targs, int include_explicit)
if(_alpm_pkg_dup(deppkg, &copy)) {
return -1;
}
- targs = alpm_list_add(targs, copy);
+ *targs = alpm_list_add(*targs, copy);
}
}
}