summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/add.c
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-05-02 07:42:32 +0000
committerAurelien Foret <aurelien@archlinux.org>2005-05-02 07:42:32 +0000
commit2cc81d9eead597d10589081e7b2ada2c09962ba1 (patch)
tree7118e487a3eb6db5d5ae961454fdac7c8294b2f8 /lib/libalpm/add.c
parent00693570064aa3ad3942e23507096649fcd10bda (diff)
downloadpacman-2cc81d9eead597d10589081e7b2ada2c09962ba1.tar.xz
code cleanup
Diffstat (limited to 'lib/libalpm/add.c')
-rw-r--r--lib/libalpm/add.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 4290e9fc..95c9a006 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -379,16 +379,16 @@ int add_commit(pmtrans_t *trans, pmdb_t *db)
for(lp = db_get_pkgcache(db); lp; lp = lp->next) {
pmpkg_t *tmpp = lp->data;
PMList *tmppm = NULL;
-
if(tmpp == NULL) {
continue;
}
for(tmppm = tmpp->depends; tmppm; tmppm = tmppm->next) {
pmdepend_t depend;
- splitdep(tmppm->data, &depend);
+ if(splitdep(tmppm->data, &depend)) {
+ continue;
+ }
if(tmppm->data && !strcmp(depend.name, info->name)) {
info->requiredby = pm_list_add(info->requiredby, strdup(tmpp->name));
- continue;
}
}
}
@@ -414,11 +414,9 @@ int add_commit(pmtrans_t *trans, pmdb_t *db)
for(lp = info->depends; lp; lp = lp->next) {
pmpkg_t *depinfo;
pmdepend_t depend;
-
if(splitdep(lp->data, &depend)) {
continue;
}
-
depinfo = db_get_pkgfromcache(db, depend.name);
if(depinfo == NULL) {
/* look for a provides package */