From: Stephen Morris Date: Thu, 3 Jan 2013 19:27:46 +0000 (+0000) Subject: [2524] Change to comments after review. X-Git-Tag: bind10-1.0.0-rc-release~99^2~25^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9fbb0ae95365974d80a87704f64d6e4907dcb52e;p=thirdparty%2Fkea.git [2524] Change to comments after review. --- diff --git a/src/lib/dhcpsrv/lease_mgr_factory.cc b/src/lib/dhcpsrv/lease_mgr_factory.cc index 23ba12f5a8..9fd276d9ac 100644 --- a/src/lib/dhcpsrv/lease_mgr_factory.cc +++ b/src/lib/dhcpsrv/lease_mgr_factory.cc @@ -74,21 +74,23 @@ LeaseMgrFactory::parse(const std::string& dbaccess) { std::string LeaseMgrFactory::redactedAccessString(const LeaseMgr::ParameterMap& parameters) { - // Reconstruct the access string - std::string access = ""; + // Reconstruct the access string: start of with an empty string, then + // work through all the parameters in the original string and add them. + std::string access; for (LeaseMgr::ParameterMap::const_iterator i = parameters.begin(); i != parameters.end(); ++i) { - // Separate second and subsequent tokens. + // Separate second and subsequent tokens are preceded by a space. if (!access.empty()) { access += " "; } - // Append name of parameter + // Append name of parameter... access += i->first; access += "="; - // Redact the password + // ... and the value, except in the case of the password, where a + // redacted value is appended. if (i->first == std::string("password")) { access += "*****"; } else {