Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=10100bb8f97de2acf46fde65767f9b07cd5c4c5e
commit 10100bb8f97de2acf46fde65767f9b07cd5c4c5e Author: Michel Hermier <[email protected]> Date: Fri May 3 08:25:29 2013 +0200 libpacman: Use continue instead of using a conditional on a big for block. diff --git a/lib/libpacman/deps.c b/lib/libpacman/deps.c index 489b516..37e2731 100644 --- a/lib/libpacman/deps.c +++ b/lib/libpacman/deps.c @@ -423,23 +423,24 @@ pmlist_t *_pacman_checkdeps(pmtrans_t *trans, unsigned char op, pmlist_t *packag /* check requiredby fields */ found=0; for(j = _pacman_pkg_getinfo(tp, PM_PKG_REQUIREDBY); j; j = j->next) { - if(!f_stringlist_find (packages, (char *)j->data)) { - /* check if a package in trans->packages provides this package */ - for (k = trans->packages; !found && k; k = k->next) { - pmsyncpkg_t *ps = k->data; - pmpkg_t *spkg = ps->pkg_new; - if(spkg && f_stringlist_find (_pacman_pkg_getinfo(spkg, PM_PKG_PROVIDES), pkg_name)) { - found=1; - } + if(f_stringlist_find (packages, (char *)j->data) != NULL) { + continue; + } + /* check if a package in trans->packages provides this package */ + for (k = trans->packages; !found && k; k = k->next) { + pmsyncpkg_t *ps = k->data; + pmpkg_t *spkg = ps->pkg_new; + if(spkg && f_stringlist_find (_pacman_pkg_getinfo(spkg, PM_PKG_PROVIDES), pkg_name)) { + found=1; } - if(!found) { - _pacman_log(PM_LOG_DEBUG, _("checkdeps: found %s which requires %s"), (char *)j->data, pkg_name); - miss = _pacman_depmiss_new (pkg_name, PM_DEP_TYPE_REQUIRED, PM_DEP_MOD_ANY, j->data, NULL); - if(!_pacman_depmiss_isin(miss, baddeps)) { - baddeps = _pacman_list_add(baddeps, miss); - } else { - FREE(miss); - } + } + if(!found) { + _pacman_log(PM_LOG_DEBUG, _("checkdeps: found %s which requires %s"), (char *)j->data, pkg_name); + miss = _pacman_depmiss_new (pkg_name, PM_DEP_TYPE_REQUIRED, PM_DEP_MOD_ANY, j->data, NULL); + if(!_pacman_depmiss_isin(miss, baddeps)) { + baddeps = _pacman_list_add(baddeps, miss); + } else { + FREE(miss); } } } _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
