BIND 10 trac2317, updated. 7d705b35fe149cc0c6b93211f2733537b05bd905 [2317] Eliminated cppcheck errors.
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Jan 14 13:21:03 UTC 2013
The branch, trac2317 has been updated
via 7d705b35fe149cc0c6b93211f2733537b05bd905 (commit)
from 016a19585f32b9bdf57fc5aecdc3b073f3d1a482 (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 7d705b35fe149cc0c6b93211f2733537b05bd905
Author: Marcin Siodelski <marcin at isc.org>
Date: Mon Jan 14 14:20:50 2013 +0100
[2317] Eliminated cppcheck errors.
-----------------------------------------------------------------------
Summary of changes:
src/bin/dhcp4/config_parser.cc | 2 +-
src/bin/dhcp6/config_parser.cc | 2 +-
src/bin/dhcp6/dhcp6_srv.cc | 2 +-
src/bin/dhcp6/tests/config_parser_unittest.cc | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/dhcp4/config_parser.cc b/src/bin/dhcp4/config_parser.cc
index 8ebbaff..d3cda6a 100644
--- a/src/bin/dhcp4/config_parser.cc
+++ b/src/bin/dhcp4/config_parser.cc
@@ -1118,7 +1118,7 @@ private:
// Check the option definition parameters are valid.
try {
def->validate();
- } catch (const isc::Exception ex) {
+ } catch (const isc::Exception& ex) {
isc_throw(DhcpConfigError, "invalid option definition"
<< " parameters: " << ex.what());
}
diff --git a/src/bin/dhcp6/config_parser.cc b/src/bin/dhcp6/config_parser.cc
index c0e6c07..0d0bd71 100644
--- a/src/bin/dhcp6/config_parser.cc
+++ b/src/bin/dhcp6/config_parser.cc
@@ -1148,7 +1148,7 @@ private:
// Check the option definition parameters are valid.
try {
def->validate();
- } catch (const isc::Exception ex) {
+ } catch (const isc::Exception& ex) {
isc_throw(DhcpConfigError, "invalid option definition"
<< " parameters: " << ex.what());
}
diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc
index b90c33e..271a62b 100644
--- a/src/bin/dhcp6/dhcp6_srv.cc
+++ b/src/bin/dhcp6/dhcp6_srv.cc
@@ -404,7 +404,7 @@ void Dhcpv6Srv::sanityCheck(const Pkt6Ptr& pkt, RequirementLevel clientid,
Option::OptionCollection server_ids = pkt->getOptions(D6O_SERVERID);
switch (serverid) {
case FORBIDDEN:
- if (server_ids.size() > 0) {
+ if (!server_ids.empty()) {
isc_throw(RFCViolation, "Exactly 1 server-id option expected, but "
<< server_ids.size() << " received in " << pkt->getName());
}
diff --git a/src/bin/dhcp6/tests/config_parser_unittest.cc b/src/bin/dhcp6/tests/config_parser_unittest.cc
index 89cbe4f..b6ef97f 100644
--- a/src/bin/dhcp6/tests/config_parser_unittest.cc
+++ b/src/bin/dhcp6/tests/config_parser_unittest.cc
@@ -81,7 +81,7 @@ public:
params["code"] = "38";
params["data"] = "AB CDEF0105";
params["csv-format"] = "False";
- } else if (parameter == "name") {
+ } else if (parameter == "space") {
params["name"] = "subscriber-id";
params["space"] = param_value;
params["code"] = "38";
More information about the bind10-changes
mailing list