summaryrefslogtreecommitdiff
path: root/apt-pkg/policy.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-11-04 21:08:55 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2015-11-05 12:21:33 +0100
commit258b9e512c4001e806c5c0966acecd3d742ec6e9 (patch)
treec8bdbb43dd9e1b5d54b90e4845065a653d585ca5 /apt-pkg/policy.cc
parent9fb4e6510faaa9c84b88d4cb567bf3deebf8e0b7 (diff)
apply various suggestions made by cppcheck
Reported-By: cppcheck Git-Dch: Ignore
Diffstat (limited to 'apt-pkg/policy.cc')
-rw-r--r--apt-pkg/policy.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc
index 4f953bd50..d442e5c90 100644
--- a/apt-pkg/policy.cc
+++ b/apt-pkg/policy.cc
@@ -235,7 +235,7 @@ pkgCache::VerIterator pkgPolicy::GetCandidateVerNew(pkgCache::PkgIterator const
int candPriority = -1;
pkgVersioningSystem *vs = Cache->VS;
- for (pkgCache::VerIterator ver = Pkg.VersionList(); ver.end() == false; ver++) {
+ for (pkgCache::VerIterator ver = Pkg.VersionList(); ver.end() == false; ++ver) {
int priority = GetPriority(ver, true);
if (priority == 0 || priority <= candPriority)
@@ -322,7 +322,7 @@ void pkgPolicy::CreatePin(pkgVersionMatch::MatchType Type,string Name,
// Find matching version(s) and copy the pin into it
pkgVersionMatch Match(P->Data,P->Type);
- for (pkgCache::VerIterator Ver = Pkg.VersionList(); Ver.end() != true; Ver++)
+ for (pkgCache::VerIterator Ver = Pkg.VersionList(); Ver.end() != true; ++Ver)
{
if (Match.VersionMatches(Ver)) {
Pin *VP = VerPins + Ver->ID;