summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/deb/dpkgpm.cc16
1 files changed, 4 insertions, 12 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index 593875071..3fbda0552 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -201,18 +201,10 @@ pkgCache::VerIterator FindNowVersion(const pkgCache::PkgIterator &Pkg)
{
pkgCache::VerIterator Ver;
for (Ver = Pkg.VersionList(); Ver.end() == false; ++Ver)
- {
- pkgCache::VerFileIterator Vf = Ver.FileList();
- pkgCache::PkgFileIterator F = Vf.File();
- for (F = Vf.File(); F.end() == false; ++F)
- {
- if (F && F.Archive())
- {
- if (strcmp(F.Archive(), "now"))
- return Ver;
- }
- }
- }
+ for (pkgCache::VerFileIterator Vf = Ver.FileList(); Vf.end() == false; ++Vf)
+ for (pkgCache::PkgFileIterator F = Vf.File(); F.end() == false; ++F)
+ if (F->Archive != 0 && strcmp(F.Archive(), "now") == 0)
+ return Ver;
return Ver;
}
/*}}}*/