From: Slawek Figiel Date: Wed, 24 May 2023 14:12:53 +0000 (+0200) Subject: [#2815] Remove trailing whitespace X-Git-Tag: Kea-2.3.8~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=489496d605b0aebb0fdd23e9271892f1c010b43d;p=thirdparty%2Fkea.git [#2815] Remove trailing whitespace --- diff --git a/src/lib/dhcpsrv/cfg_hosts.cc b/src/lib/dhcpsrv/cfg_hosts.cc index 22b48aa3f3..a8c52eff74 100644 --- a/src/lib/dhcpsrv/cfg_hosts.cc +++ b/src/lib/dhcpsrv/cfg_hosts.cc @@ -1141,7 +1141,7 @@ CfgHosts::del4(const SubnetID& subnet_id, const auto t = boost::make_tuple(std::vector(identifier_begin, identifier_begin + identifier_len), identifier_type); - const auto& range = idx.equal_range(t); + const auto& range = idx.equal_range(t); size_t erased = 0; for (auto key = range.first; key != range.second;) { if ((*key)->getIPv4SubnetID() != subnet_id) { @@ -1191,7 +1191,7 @@ CfgHosts::del6(const SubnetID& subnet_id, const auto t = boost::make_tuple(std::vector(identifier_begin, identifier_begin + identifier_len), identifier_type); - const auto& range = idx.equal_range(t); + const auto& range = idx.equal_range(t); size_t erased_hosts = 0; size_t erased_reservations = 0; for (auto key = range.first; key != range.second;) { diff --git a/src/lib/dhcpsrv/host_mgr.cc b/src/lib/dhcpsrv/host_mgr.cc index 1951e7d870..f5a41f2367 100644 --- a/src/lib/dhcpsrv/host_mgr.cc +++ b/src/lib/dhcpsrv/host_mgr.cc @@ -145,7 +145,7 @@ ConstHostCollection HostMgr::getAll(const Host::IdentifierType& identifier_type, const uint8_t* identifier_begin, const size_t identifier_len) const { - return getAll(identifier_type, identifier_begin, identifier_len, + return getAll(identifier_type, identifier_begin, identifier_len, HostMgrOperationTarget::ALL_SOURCES); } @@ -751,7 +751,7 @@ HostMgr::add(const HostPtr& host, const HostMgrOperationTarget target) { if (alternate_sources_.empty() && !(target & HostMgrOperationTarget::PRIMARY_SOURCE)) { isc_throw(NoHostDataSourceManager, "Unable to add new host because there is " "no hosts-database configured."); - + } for (auto source : alternate_sources_) { @@ -886,7 +886,7 @@ HostMgr::update(HostPtr const& host, const HostMgrOperationTarget target) { isc_throw(NoHostDataSourceManager, "Unable to update existing host because there is no hosts-database configured."); } - + for (HostDataSourcePtr const& source : alternate_sources_) { source->update(host); } diff --git a/src/lib/dhcpsrv/hosts_messages.mes b/src/lib/dhcpsrv/hosts_messages.mes index 3c671c8688..8d897eead8 100644 --- a/src/lib/dhcpsrv/hosts_messages.mes +++ b/src/lib/dhcpsrv/hosts_messages.mes @@ -41,7 +41,7 @@ address. % HOSTS_CFG_DEL4 deleted %1 host(s) for subnet id %2 and identifier %3 This debug message is issued when IPv4 reservations are deleted for the specified subnet and identifier. The first argument specifies how many hosts have been -deleted. The second argument is the subnet identifier. The third argument is +deleted. The second argument is the subnet identifier. The third argument is the identifier. % HOSTS_CFG_DEL6 deleted %1 host(s) having %2 IPv6 reservation(s) for subnet id %3 and identifier %4 diff --git a/src/lib/dhcpsrv/tests/cfg_hosts_unittest.cc b/src/lib/dhcpsrv/tests/cfg_hosts_unittest.cc index 337a7200db..58c0d03a4f 100644 --- a/src/lib/dhcpsrv/tests/cfg_hosts_unittest.cc +++ b/src/lib/dhcpsrv/tests/cfg_hosts_unittest.cc @@ -507,7 +507,7 @@ TEST_F(CfgHostsTest, deleteForIPv4) { // Make sure the hosts and IP reservations were added. ASSERT_EQ(host_count, hosts_by_subnet.size()); ASSERT_EQ(1, hosts_by_address.size()); - + // Delete one host. EXPECT_TRUE(cfg.del(subnet_id, address)); @@ -536,7 +536,7 @@ TEST_F(CfgHostsTest, deleteForIPv6) { increase(IOAddress(address), i))); cfg.add(host); } - + // Get all inserted hosts. auto hosts_by_subnet_and_address = cfg.getAll6(subnet_id, address); @@ -544,7 +544,7 @@ TEST_F(CfgHostsTest, deleteForIPv6) { // Make sure the hosts and IP reservations were added. ASSERT_EQ(1, hosts_by_subnet_and_address.size()); ASSERT_EQ(host_count, hosts_by_subnet.size()); - + // Delete one host. EXPECT_TRUE(cfg.del(subnet_id, address)); @@ -616,7 +616,7 @@ TEST_F(CfgHostsTest, del4) { // Delete one host. EXPECT_TRUE(cfg.del4(subnet_id, Host::IdentifierType::IDENT_DUID, &duids_[host_id]->getDuid()[0], duids_[host_id]->getDuid().size())); - + // Check if the host is actually deleted. hosts_by_subnet = cfg.getAll4(subnet_id); hosts_by_address = cfg.getAll4(increase(address, host_id)); @@ -675,7 +675,7 @@ TEST_F(CfgHostsTest, del6) { // Delete one host. EXPECT_TRUE(cfg.del6(subnet_id, Host::IdentifierType::IDENT_DUID, &duids_[host_id]->getDuid()[0], duids_[host_id]->getDuid().size())); - + // Check if the host is actually deleted. hosts_by_subnet = cfg.getAll6(subnet_id); hosts_by_address = cfg.getAll6(increase(address, host_id)); diff --git a/src/lib/dhcpsrv/testutils/generic_host_data_source_unittest.cc b/src/lib/dhcpsrv/testutils/generic_host_data_source_unittest.cc index ee2c5851e1..26ef3667fd 100644 --- a/src/lib/dhcpsrv/testutils/generic_host_data_source_unittest.cc +++ b/src/lib/dhcpsrv/testutils/generic_host_data_source_unittest.cc @@ -4489,7 +4489,7 @@ HostMgrTest::testAdd(BaseHostDataSource& data_source1, HostMgr::instance().add(host, HostMgrOperationTarget::UNSPECIFIED_SOURCE); // Verify the hosts were added. - // ALL_SOURCES + PRIMARY_SOURCE targets for IPv4 and IPv6. + // ALL_SOURCES + PRIMARY_SOURCE targets for IPv4 and IPv6. size_t hosts_in_primary_source = 2 * 2 * (is_first_source_primary || is_second_source_primary); // Default + ALL_SOURCES + ALTERNATE_SOURCES targets for IPv4 and IPv6. size_t hosts_in_alternate_sources = 3 * 2 * (!is_first_source_primary || !is_second_source_primary);