summaryrefslogtreecommitdiff
path: root/apt-pkg/deb
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-01-28 16:43:49 +0100
committerMichael Vogt <mvo@debian.org>2014-01-28 16:43:49 +0100
commitacead5b93cf49ab33cba4be2ea8e1b253ed0f2bf (patch)
tree7c8631716d2182c7891533a0e4ce3b6962595f17 /apt-pkg/deb
parentf4a631adf2f14c99d61ecb7f61cb1b3625c1cde4 (diff)
parentbae81c1307e956aa8928c9d6a77830fb733cd61f (diff)
Merge branch 'debian/sid' into ubuntu/master
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r--apt-pkg/deb/dpkgpm.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index a72745774..25a1e6055 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -567,7 +567,6 @@ void pkgDPkgPM::ProcessDpkgStatusLine(char *line)
std::string prefix = APT::String::Strip(list[0]);
std::string pkgname;
std::string action;
- ostringstream status;
// "processing" has the form "processing: action: pkg or trigger"
// with action = ["install", "configure", "remove", "purge", "disappear",
@@ -1661,7 +1660,7 @@ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg)
io_errors.push_back(string("failed in write on buffer copy for %s"));
io_errors.push_back(string("short read on buffer copy for %s"));
- for (vector<string>::iterator I = io_errors.begin(); I != io_errors.end(); I++)
+ for (vector<string>::iterator I = io_errors.begin(); I != io_errors.end(); ++I)
{
vector<string> list = VectorizeString(dgettext("dpkg", (*I).c_str()), '%');
if (list.size() > 1) {
@@ -1776,13 +1775,11 @@ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg)
string histfile_name = _config->FindFile("Dir::Log::History");
if (!histfile_name.empty())
{
- FILE *log = NULL;
- char buf[1024];
-
fprintf(report, "DpkgHistoryLog:\n");
- log = fopen(histfile_name.c_str(),"r");
+ FILE* log = fopen(histfile_name.c_str(),"r");
if(log != NULL)
{
+ char buf[1024];
while( fgets(buf, sizeof(buf), log) != NULL)
fprintf(report, " %s", buf);
fclose(log);