]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Unshadow variables in ssl/certificate_db.cc
authorFrancesco Chemolli <kinkie@squid-cache.org>
Wed, 23 Jan 2013 17:36:25 +0000 (18:36 +0100)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Wed, 23 Jan 2013 17:36:25 +0000 (18:36 +0100)
src/ssl/certificate_db.cc

index 391025bf7a8be02c44b8734f323dd38bada73500..2683df1a70068ad5c05b7a53ae46e623b89f4ed7 100644 (file)
@@ -433,21 +433,21 @@ void Ssl::CertificateDb::subSize(std::string const & filename)
 
 size_t Ssl::CertificateDb::readSize() const
 {
-    std::ifstream size_file(size_full.c_str());
-    if (!size_file && enabled_disk_store)
+    std::ifstream ifstr(size_full.c_str());
+    if (!ifstr && enabled_disk_store)
         throw std::runtime_error("cannot open for reading: " + size_full);
     size_t db_size = 0;
-    if (!(size_file >> db_size))
+    if (!(ifstr >> db_size))
         throw std::runtime_error("error while reading " + size_full);
     return db_size;
 }
 
 void Ssl::CertificateDb::writeSize(size_t db_size)
 {
-    std::ofstream size_file(size_full.c_str());
-    if (!size_file && enabled_disk_store)
+    std::ofstream ofstr(size_full.c_str());
+    if (!ofstr && enabled_disk_store)
         throw std::runtime_error("cannot write \"" + size_full + "\" file");
-    size_file << db_size;
+    ofstr << db_size;
 }
 
 size_t Ssl::CertificateDb::getFileSize(std::string const & filename)