diff options
author | David Kalnischkies <david@kalnischkies.de> | 2019-07-08 15:48:59 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2019-07-08 15:51:17 +0200 |
commit | 2b734a7ec429825c7007c1093883229e069d36c7 (patch) | |
tree | b67360f3201634c82f5a9e7dd84f47b28fa63acb /apt-private/private-cacheset.cc | |
parent | cbe90ee516d7f747f981e423f164f99eb767240b (diff) |
Apply various suggestions by cppcheck
Reported-By: cppcheck
Diffstat (limited to 'apt-private/private-cacheset.cc')
-rw-r--r-- | apt-private/private-cacheset.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apt-private/private-cacheset.cc b/apt-private/private-cacheset.cc index 98b842adb..2a5afac7b 100644 --- a/apt-private/private-cacheset.cc +++ b/apt-private/private-cacheset.cc @@ -254,11 +254,12 @@ bool CacheSetHelperAPTGet::showVirtualPackageErrors(pkgCacheFile &Cache) pkgCache::PrvIterator I = Pkg.ProvidesList(); unsigned short provider = 0; for (; I.end() == false; ++I) { - pkgCache::PkgIterator Pkg = I.OwnerPkg(); + pkgCache::PkgIterator const OPkg = I.OwnerPkg(); - if (Cache[Pkg].CandidateVerIter(Cache) == I.OwnerVer()) { - c1out << " " << Pkg.FullName(true) << " " << I.OwnerVer().VerStr(); - if (Cache[Pkg].Install() == true && Cache[Pkg].NewInstall() == false) + if (Cache[OPkg].CandidateVerIter(Cache) == I.OwnerVer()) + { + c1out << " " << OPkg.FullName(true) << " " << I.OwnerVer().VerStr(); + if (Cache[OPkg].Install() == true && Cache[OPkg].NewInstall() == false) c1out << _(" [Installed]"); c1out << std::endl; ++provider; |