diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2013-04-23 08:08:54 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2013-04-23 08:08:54 +0200 |
commit | 3444603f5ff2b4c4816e45e686e06e01df31cdc4 (patch) | |
tree | b0e63e9bc86ca6d39f6987381ca7bfa64e186048 /apt-pkg/deb/dpkgpm.cc | |
parent | 52d5690b47bd4efe425fa23d9f6559bb44324cd1 (diff) | |
parent | 3278fe66567d149ea92c1afa78941f2bc3c71c85 (diff) |
merged debian-sid branch and resolved conflicts
Diffstat (limited to 'apt-pkg/deb/dpkgpm.cc')
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 0e468b590..cb137729d 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -147,11 +147,11 @@ static pkgCache::VerIterator FindNowVersion(const pkgCache::PkgIterator &Pkg) { pkgCache::VerIterator Ver; - for (Ver = Pkg.VersionList(); Ver.end() == false; 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++) + for (F = Vf.File(); F.end() == false; ++F) { if (F && F.Archive()) { @@ -1590,12 +1590,12 @@ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg) if (!logfile_name.empty()) { FILE *log = NULL; - char buf[1024]; fprintf(report, "DpkgTerminalLog:\n"); log = fopen(logfile_name.c_str(),"r"); if(log != NULL) { + char buf[1024]; while( fgets(buf, sizeof(buf), log) != NULL) fprintf(report, " %s", buf); fclose(log); @@ -1614,13 +1614,11 @@ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg) // attach dmesg log (to learn about segfaults) if (FileExists("/bin/dmesg")) { - FILE *log = NULL; - char buf[1024]; - fprintf(report, "Dmesg:\n"); - log = popen("/bin/dmesg","r"); + FILE *log = popen("/bin/dmesg","r"); if(log != NULL) { + char buf[1024]; while( fgets(buf, sizeof(buf), log) != NULL) fprintf(report, " %s", buf); pclose(log); @@ -1630,13 +1628,12 @@ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg) // attach df -l log (to learn about filesystem status) if (FileExists("/bin/df")) { - FILE *log = NULL; - char buf[1024]; fprintf(report, "Df:\n"); - log = popen("/bin/df -l","r"); + FILE *log = popen("/bin/df -l","r"); if(log != NULL) { + char buf[1024]; while( fgets(buf, sizeof(buf), log) != NULL) fprintf(report, " %s", buf); pclose(log); |