]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2524] Change to comments after review.
authorStephen Morris <stephen@isc.org>
Thu, 3 Jan 2013 19:27:46 +0000 (19:27 +0000)
committerStephen Morris <stephen@isc.org>
Thu, 3 Jan 2013 19:27:46 +0000 (19:27 +0000)
src/lib/dhcpsrv/lease_mgr_factory.cc

index 23ba12f5a88055f585d396b06f4916ff75ee1bbd..9fd276d9ac14d1f81a54d50be3845a10be0674db 100644 (file)
@@ -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 {