summaryrefslogtreecommitdiff
path: root/cmdline/apt-get.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2019-07-08 15:48:59 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2019-07-08 15:51:17 +0200
commit2b734a7ec429825c7007c1093883229e069d36c7 (patch)
treeb67360f3201634c82f5a9e7dd84f47b28fa63acb /cmdline/apt-get.cc
parentcbe90ee516d7f747f981e423f164f99eb767240b (diff)
Apply various suggestions by cppcheck
Reported-By: cppcheck
Diffstat (limited to 'cmdline/apt-get.cc')
-rw-r--r--cmdline/apt-get.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 7ef07fbf0..5d81c08a4 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -148,8 +148,7 @@ static bool DoDSelectUpgrade(CommandLine &)
pkgDepCache::ActionGroup group(Cache);
// Install everything with the install flag set
- pkgCache::PkgIterator I = Cache->PkgBegin();
- for (;I.end() != true; ++I)
+ for (pkgCache::PkgIterator I = Cache->PkgBegin(); I.end() != true; ++I)
{
/* Install the package only if it is a new install, the autoupgrader
will deal with the rest */
@@ -159,7 +158,7 @@ static bool DoDSelectUpgrade(CommandLine &)
/* Now install their deps too, if we do this above then order of
the status file is significant for | groups */
- for (I = Cache->PkgBegin();I.end() != true; ++I)
+ for (pkgCache::PkgIterator I = Cache->PkgBegin(); I.end() != true; ++I)
{
/* Install the package only if it is a new install, the autoupgrader
will deal with the rest */
@@ -168,7 +167,7 @@ static bool DoDSelectUpgrade(CommandLine &)
}
// Apply erasures now, they override everything else.
- for (I = Cache->PkgBegin();I.end() != true; ++I)
+ for (pkgCache::PkgIterator I = Cache->PkgBegin(); I.end() != true; ++I)
{
// Remove packages
if (I->SelectedState == pkgCache::State::DeInstall ||