]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2815] Fix boost::distance call
authorSlawek Figiel <slawek@isc.org>
Thu, 25 May 2023 19:07:32 +0000 (21:07 +0200)
committerSlawek Figiel <slawek@isc.org>
Fri, 26 May 2023 09:19:59 +0000 (09:19 +0000)
src/lib/dhcpsrv/cfg_hosts.cc

index a8c52eff74b23cdb90b903e591d9e9de189f4c4e..20aa6a595e07745ff6eae16c391e789d0ac9f256 100644 (file)
@@ -1103,7 +1103,7 @@ CfgHosts::del(const SubnetID& subnet_id, const asiolink::IOAddress& addr) {
         // Delete IPv6 reservations.
         const auto& range = idx6.equal_range(boost::make_tuple(subnet_id, addr));
         idx6.erase(range.first, range.second);
-        erased_addresses = boost::distance(range.first, range.second);
+        erased_addresses = boost::distance(range);
 
         // Delete hosts.
         for (auto key = range.first; key != range.second; ++key) {