From 2cc81d9eead597d10589081e7b2ada2c09962ba1 Mon Sep 17 00:00:00 2001 From: Aurelien Foret Date: Mon, 2 May 2005 07:42:32 +0000 Subject: code cleanup --- lib/libalpm/add.c | 8 +++----- 1 file 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 */ -- cgit v1.2.3-70-g09d2