BIND 10 trac3282, updated. f9cea380de68d0c181b4f80ad3df05cd53eb37e9 [3282] Removed use of std::string::back
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Jan 20 16:29:35 UTC 2014
The branch, trac3282 has been updated
via f9cea380de68d0c181b4f80ad3df05cd53eb37e9 (commit)
from c75896605bb0224250ff5a460d4bb7de55e18751 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit f9cea380de68d0c181b4f80ad3df05cd53eb37e9
Author: Thomas Markwalder <tmark at isc.org>
Date: Mon Jan 20 11:28:18 2014 -0500
[3282] Removed use of std::string::back
Didn't notice but back() is new and not supported on older
versions of C++.
-----------------------------------------------------------------------
Summary of changes:
src/lib/dhcpsrv/d2_client.cc | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
-----------------------------------------------------------------------
diff --git a/src/lib/dhcpsrv/d2_client.cc b/src/lib/dhcpsrv/d2_client.cc
index 6ae425a..031066d 100644
--- a/src/lib/dhcpsrv/d2_client.cc
+++ b/src/lib/dhcpsrv/d2_client.cc
@@ -254,7 +254,11 @@ std::string
D2ClientMgr::qualifyName(const std::string& partial_name) const {
std::ostringstream gen_name;
gen_name << partial_name << "." << d2_client_config_->getQualifyingSuffix();
- if (gen_name.str().back() != '.') {
+
+ // Tack on a trailing dot in case suffix doesn't have one.
+ const char* str = gen_name.str().c_str();
+ size_t len = strlen(str);
+ if ((len > 0) && (str[len-1] != '.')) {
gen_name << ".";
}
More information about the bind10-changes
mailing list