summaryrefslogtreecommitdiffstats
path: root/src/lib/dhcp
diff options
context:
space:
mode:
authorFrancis Dupont <fdupont@isc.org>2019-06-21 12:56:45 +0200
committerFrancis Dupont <fdupont@isc.org>2019-06-21 13:02:53 +0200
commit67108ee94778a9a02a34199d6b8b11771bdaf97f (patch)
tree10b0eba80e51e92e1115a2cbde785a67824d4746 /src/lib/dhcp
parent[527-check-return-value-of-multi-index-push_back] Added either explicit cast ... (diff)
downloadkea-67108ee94778a9a02a34199d6b8b11771bdaf97f.tar.xz
kea-67108ee94778a9a02a34199d6b8b11771bdaf97f.zip
[527-check-return-value-of-multi-index-push_back] Addressed comments
Added shared network getSubnet by prefix Fixed and completed subnet duplicate unit tests
Diffstat (limited to 'src/lib/dhcp')
-rw-r--r--src/lib/dhcp/libdhcp++.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/dhcp/libdhcp++.cc b/src/lib/dhcp/libdhcp++.cc
index 2cd286ae77..a55313e618 100644
--- a/src/lib/dhcp/libdhcp++.cc
+++ b/src/lib/dhcp/libdhcp++.cc
@@ -1024,11 +1024,8 @@ void initOptionSpace(OptionDefContainerPtr& defs,
throw;
}
- auto ret = defs->push_back(definition);
- if (!ret.second) {
- // defs points to a multi index container with only not unique
- // indexes so this is for sanity only.
- isc_throw(isc::Unexpected, "can't store option definition");
- }
+ // option_defs is a multi-index container with no unique indexes
+ // so push_back can't fail).
+ static_cast<void>(defs->push_back(definition));
}
}