diff options
-rw-r--r-- | apt-pkg/depcache.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 0f86640d5..b1447bb6c 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -827,15 +827,15 @@ void pkgDepCache::Update(PkgIterator const &Pkg) Update(Pkg.RevDependsList()); // Update the provides map for the current ver - if (Pkg->CurrentVer != 0) - for (PrvIterator P = Pkg.CurrentVer().ProvidesList(); - P.end() != true; ++P) + auto const CurVer = Pkg.CurrentVer(); + if (not CurVer.end()) + for (PrvIterator P = CurVer.ProvidesList(); not P.end(); ++P) Update(P.ParentPkg().RevDependsList()); // Update the provides map for the candidate ver - if (PkgState[Pkg->ID].CandidateVer != 0) - for (PrvIterator P = PkgState[Pkg->ID].CandidateVerIter(*this).ProvidesList(); - P.end() != true; ++P) + auto const CandVer = PkgState[Pkg->ID].CandidateVerIter(*this); + if (not CandVer.end() && CandVer != CurVer) + for (PrvIterator P = CandVer.ProvidesList(); not P.end(); ++P) Update(P.ParentPkg().RevDependsList()); } /*}}}*/ |