diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2013-03-10 12:24:13 +0100 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2013-03-10 12:24:13 +0100 |
commit | 69c2ecbdc937e3c73fe67d3c9bce12a80d3ec7ec (patch) | |
tree | b3b8f0753ebe2760ab8d97b0e9404ddbeef25a1b /apt-pkg/indexcopy.cc | |
parent | fd6a8d0ddc14406bb6c0996b5bbaa95d6ccc1186 (diff) |
various simple changes to fix cppcheck warnings
Diffstat (limited to 'apt-pkg/indexcopy.cc')
-rw-r--r-- | apt-pkg/indexcopy.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc index aa1f01a4a..6e35fc40e 100644 --- a/apt-pkg/indexcopy.cc +++ b/apt-pkg/indexcopy.cc @@ -141,7 +141,6 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector<string> &List, File = OrigPath + ChopDirs(File,Chop); // See if the file exists - bool Mangled = false; if (NoStat == false || Hits < 10) { // Attempt to fix broken structure @@ -164,6 +163,7 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector<string> &List, if (stat(string(CDROM + Prefix + File).c_str(),&Buf) != 0 || Buf.st_size == 0) { + bool Mangled = false; // Attempt to fix busted symlink support for one instance string OrigFile = File; string::size_type Start = File.find("binary-"); @@ -799,9 +799,7 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name, /*{{{*/ unsigned int WrongSize = 0; unsigned int Packages = 0; for (vector<string>::iterator I = List.begin(); I != List.end(); ++I) - { - string OrigPath = string(*I,CDROM.length()); - + { // Open the package file FileFd Pkg(*I, FileFd::ReadOnly, FileFd::Auto); off_t const FileSize = Pkg.Size(); |