summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/dpkgpm.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-08-12 10:32:05 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2011-08-12 10:32:05 +0200
commitea50fdfe2fc21757412baf448b2d41b3ce34b626 (patch)
tree8910d5504be3cb1952ce33bbabbc0c02a832c735 /apt-pkg/deb/dpkgpm.cc
parent851d681d0af7f3346d77738e4708b21ed6e2cc98 (diff)
parentf5a34606b4a910e7b7b984940fb2d12681a2dd3b (diff)
lots of cppcheck fixes
Diffstat (limited to 'apt-pkg/deb/dpkgpm.cc')
-rw-r--r--apt-pkg/deb/dpkgpm.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index 5fbd1801a..46f48777c 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -213,7 +213,7 @@ bool pkgDPkgPM::SendV2Pkgs(FILE *F)
fprintf(F,"\n");
// Write out the package actions in order.
- for (vector<Item>::iterator I = List.begin(); I != List.end(); I++)
+ for (vector<Item>::iterator I = List.begin(); I != List.end(); ++I)
{
if(I->Pkg.end() == true)
continue;
@@ -335,7 +335,7 @@ bool pkgDPkgPM::RunScriptsWithPkgs(const char *Cnf)
// Feed it the filenames.
if (Version <= 1)
{
- for (vector<Item>::iterator I = List.begin(); I != List.end(); I++)
+ for (vector<Item>::iterator I = List.begin(); I != List.end(); ++I)
{
// Only deal with packages to be installed from .deb
if (I->Op != Item::Install)
@@ -690,7 +690,7 @@ bool pkgDPkgPM::OpenLog()
chmod(history_name.c_str(), 0644);
fprintf(history_out, "\nStart-Date: %s\n", timestr);
string remove, purge, install, reinstall, upgrade, downgrade;
- for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++)
+ for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I)
{
enum { CANDIDATE, CANDIDATE_AUTO, CURRENT_CANDIDATE, CURRENT } infostring;
string *line = NULL;
@@ -868,14 +868,14 @@ bool pkgDPkgPM::Go(int OutStatusFd)
// that will be [installed|configured|removed|purged] and add
// them to the PackageOps map (the dpkg states it goes through)
// and the PackageOpsTranslations (human readable strings)
- for (vector<Item>::const_iterator I = List.begin(); I != List.end();I++)
+ for (vector<Item>::const_iterator I = List.begin(); I != List.end(); ++I)
{
if((*I).Pkg.end() == true)
continue;
string const name = (*I).Pkg.Name();
PackageOpsDone[name] = 0;
- for(int i=0; (DpkgStatesOpMap[(*I).Op][i]).state != NULL; i++)
+ for(int i=0; (DpkgStatesOpMap[(*I).Op][i]).state != NULL; ++i)
{
PackageOps[name].push_back(DpkgStatesOpMap[(*I).Op][i]);
PackagesTotal++;
@@ -893,7 +893,7 @@ bool pkgDPkgPM::Go(int OutStatusFd)
// Do all actions with the same Op in one run
vector<Item>::const_iterator J = I;
if (TriggersPending == true)
- for (; J != List.end(); J++)
+ for (; J != List.end(); ++J)
{
if (J->Op == I->Op)
continue;
@@ -905,7 +905,7 @@ bool pkgDPkgPM::Go(int OutStatusFd)
break;
}
else
- for (; J != List.end() && J->Op == I->Op; J++)
+ for (; J != List.end() && J->Op == I->Op; ++J)
/* nothing */;
// Generate the argument list
@@ -1011,7 +1011,7 @@ bool pkgDPkgPM::Go(int OutStatusFd)
// Write in the file or package names
if (I->Op == Item::Install)
{
- for (;I != J && Size < MaxArgBytes; I++)
+ for (;I != J && Size < MaxArgBytes; ++I)
{
if (I->File[0] != '/')
return _error->Error("Internal Error, Pathname to install is not absolute '%s'",I->File.c_str());
@@ -1023,7 +1023,7 @@ bool pkgDPkgPM::Go(int OutStatusFd)
{
string const nativeArch = _config->Find("APT::Architecture");
unsigned long const oldSize = I->Op == Item::Configure ? Size : 0;
- for (;I != J && Size < MaxArgBytes; I++)
+ for (;I != J && Size < MaxArgBytes; ++I)
{
if((*I).Pkg.end() == true)
continue;
@@ -1461,7 +1461,7 @@ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg)
// log the ordering
const char *ops_str[] = {"Install", "Configure","Remove","Purge"};
fprintf(report, "AptOrdering:\n");
- for (vector<Item>::iterator I = List.begin(); I != List.end(); I++)
+ for (vector<Item>::iterator I = List.begin(); I != List.end(); ++I)
fprintf(report, " %s: %s\n", (*I).Pkg.Name(), ops_str[(*I).Op]);
// attach dmesg log (to learn about segfaults)