Parcourir la source

[master] Using the default value of second parameter for substr

Tomek Mrugalski il y a 12 ans
Parent
commit
9565a7939e
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/lib/dhcp/lease_mgr.cc

+ 1 - 1
src/lib/dhcp/lease_mgr.cc

@@ -45,7 +45,7 @@ LeaseMgr::LeaseMgr(const std::string& dbconfig) {
         size_t pos = token.find("=");
         if (pos != string::npos) {
             string name = token.substr(0, pos);
-            string value = token.substr(pos + 1, -1);
+            string value = token.substr(pos + 1);
             parameters_.insert(pair<string,string>(name, value));
         } else {
             isc_throw(InvalidParameter, "Cannot parse " << token