From: Francesco Chemolli Date: Wed, 23 Jan 2013 17:36:25 +0000 (+0100) Subject: Unshadow variables in ssl/certificate_db.cc X-Git-Tag: SQUID_3_4_0_1~353 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f318b8e9aee59425be709bb20ec4da079ccc97fd;p=thirdparty%2Fsquid.git Unshadow variables in ssl/certificate_db.cc --- diff --git a/src/ssl/certificate_db.cc b/src/ssl/certificate_db.cc index 391025bf7a..2683df1a70 100644 --- a/src/ssl/certificate_db.cc +++ b/src/ssl/certificate_db.cc @@ -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)