From: Andrei Pavel Date: Fri, 18 Aug 2017 06:44:29 +0000 (+0300) Subject: reverted some changes which are too pedantic X-Git-Tag: trac5524_base~16^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc5303592424c8eccffcc012da7c745a089d4e7c;p=thirdparty%2Fkea.git reverted some changes which are too pedantic --- diff --git a/configure.ac b/configure.ac index 7bcc8197a4..bba2cc942a 100644 --- a/configure.ac +++ b/configure.ac @@ -1488,11 +1488,11 @@ if test "x$enable_generate_docs" != xno ; then else AC_MSG_CHECKING([if $XSLTPROC works]) # run xsltproc to see if works - $XSLTPROC --novalid --xinclude --nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl + $XSLTPROC --novalid --xinclude http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl if test $? -ne 0 ; then AC_MSG_ERROR("Error with $XSLTPROC using release/xsl/current/manpages/docbook.xsl") fi - $XSLTPROC --novalid --xinclude --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl + $XSLTPROC --novalid --xinclude http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl if test $? -ne 0 ; then AC_MSG_ERROR("Error with $XSLTPROC using release/xsl/current/html/docbook.xsl") fi diff --git a/src/bin/d2/tests/d2_update_message_unittests.cc b/src/bin/d2/tests/d2_update_message_unittests.cc index c43ac94426..6e6fa5d949 100644 --- a/src/bin/d2/tests/d2_update_message_unittests.cc +++ b/src/bin/d2/tests/d2_update_message_unittests.cc @@ -25,20 +25,20 @@ using namespace isc::dns::rdata; using namespace isc::util; namespace { - /// @brief Test fixture class for testing D2UpdateMessage object. + /// @brief Test fixture class for testing D2UpdateMessage object class D2UpdateMessageTest : public ::testing::Test { public: - /// @brief Constructor. + /// @brief Constructor // // Does nothing. D2UpdateMessageTest() { } - /// @brief Destructor. + /// @brief Destructor // // Does nothing. ~D2UpdateMessageTest() { }; - /// @brief Return string representation of the name encoded in wire format. + /// @brief Returns string representation of the name encoded in wire format. // // This function reads the number of bytes specified in the second // argument from the buffer. It doesn't check if buffer has sufficient diff --git a/src/bin/d2/tests/dns_client_unittests.cc b/src/bin/d2/tests/dns_client_unittests.cc index 91c3e8eff0..74ddecc2df 100644 --- a/src/bin/d2/tests/dns_client_unittests.cc +++ b/src/bin/d2/tests/dns_client_unittests.cc @@ -36,7 +36,7 @@ const char* TEST_ADDRESS = "127.0.0.1"; const uint16_t TEST_PORT = 5301; const size_t MAX_SIZE = 1024; const long TEST_TIMEOUT = 5 * 1000; -/// @brief Test Fixture class. +/// @brief Test Fixture class // // This test fixture class implements DNSClient::Callback so as it can be // installed as a completion callback for tests it implements. This callback @@ -63,7 +63,7 @@ public: int received_; int expected_; - /// @brief Constructor. + /// @brief Constructor // // This constructor overrides the default logging level of asiodns logger to // prevent it from emitting debug messages from IOFetch class. Such an error @@ -87,14 +87,14 @@ public: TEST_TIMEOUT); } - /// @brief Destructor. + /// @brief Destructor // // Sets the asiodns logging level back to DEBUG. virtual ~DNSClientTest() { asiodns::logger.setSeverity(isc::log::DEBUG); }; - /// @brief Exchange completion callback. + /// @brief Exchange completion callback // // This callback is called when the exchange with the DNS server is // complete or an error occurred. This includes the occurrence of a timeout. @@ -132,7 +132,7 @@ public: } } - /// @brief Handler invoked when test timeout is hit. + /// @brief Handler invoked when test timeout is hit // // This callback stops all running (hanging) tasks on IO service. void testTimeoutHandler() { @@ -140,7 +140,7 @@ public: FAIL() << "Test timeout hit."; } - /// @brief Handler invoked when test request is received. + /// @brief Handler invoked when test request is received // // This callback handler is installed when performing async read on a // socket to emulate reception of the DNS Update request by a server. diff --git a/src/bin/dhcp4/dhcp4to6_ipc.cc b/src/bin/dhcp4/dhcp4to6_ipc.cc index 39188c2012..1db3cb5e5d 100644 --- a/src/bin/dhcp4/dhcp4to6_ipc.cc +++ b/src/bin/dhcp4/dhcp4to6_ipc.cc @@ -89,7 +89,7 @@ void Dhcp4to6Ipc::handler() { return; } - // Get the DHCPv4 message + // Get the DHCPv4 message. OptionPtr msg = msgs.begin()->second; if (!msg) { LOG_DEBUG(packet4_logger, DBG_DHCP4_DETAIL, DHCP4_DHCP4O6_BAD_PACKET) diff --git a/src/lib/dhcp/tests/option_definition_unittest.cc b/src/lib/dhcp/tests/option_definition_unittest.cc index 8b7f827218..7a517f181a 100644 --- a/src/lib/dhcp/tests/option_definition_unittest.cc +++ b/src/lib/dhcp/tests/option_definition_unittest.cc @@ -38,7 +38,7 @@ namespace { /// it around for the future. class OptionDefinitionTest : public ::testing::Test { public: - /// @brief Constructor. + /// @brief Constructor OptionDefinitionTest() { } }; @@ -1603,7 +1603,7 @@ TEST_F(OptionDefinitionTest, tuple4Tokenized) { OpaqueDataTuple tuple(OpaqueDataTuple::LENGTH_1_BYTE); ASSERT_NO_THROW(option_cast->readTuple(tuple)); EXPECT_EQ("foobar", tuple.getText()); -} +} // This test verifies that a definition of an option with a single DHCPv6 // tuple can be created and that the instance of this option can be @@ -1632,7 +1632,7 @@ TEST_F(OptionDefinitionTest, tuple6Tokenized) { OpaqueDataTuple tuple(OpaqueDataTuple::LENGTH_2_BYTES); ASSERT_NO_THROW(option_cast->readTuple(tuple)); EXPECT_EQ("foobar", tuple.getText()); -} +} // This test verifies that a definition of an option with an array // of DHCPv4 tuples can be created and that the instance of this option diff --git a/src/lib/dhcp_ddns/tests/ncr_udp_unittests.cc b/src/lib/dhcp_ddns/tests/ncr_udp_unittests.cc index e6ac57a739..7d492cbfc6 100644 --- a/src/lib/dhcp_ddns/tests/ncr_udp_unittests.cc +++ b/src/lib/dhcp_ddns/tests/ncr_udp_unittests.cc @@ -218,7 +218,7 @@ public: received_ncr_ = ncr; } - /// @brief Handler invoked when test timeout is hit. + /// @brief Handler invoked when test timeout is hit /// /// This callback stops all running (hanging) tasks on IO service. void testTimeoutHandler() { @@ -657,7 +657,7 @@ public: sent_ncrs_.push_back(ncr); } - /// @brief Handler invoked when test timeout is hit. + /// @brief Handler invoked when test timeout is hit /// /// This callback stops all running (hanging) tasks on IO service. void testTimeoutHandler() { diff --git a/src/lib/dhcpsrv/alloc_engine.h b/src/lib/dhcpsrv/alloc_engine.h index 3f3623118b..dfec61f8d6 100644 --- a/src/lib/dhcpsrv/alloc_engine.h +++ b/src/lib/dhcpsrv/alloc_engine.h @@ -1478,7 +1478,7 @@ private: /// @brief A pointer to the @c AllocEngine object. typedef boost::shared_ptr AllocEnginePtr; -} // namespace dhcp -} // namespace isc +}; // namespace isc::dhcp +}; // namespace isc #endif // ALLOC_ENGINE_H diff --git a/src/lib/dhcpsrv/base_host_data_source.h b/src/lib/dhcpsrv/base_host_data_source.h index e4d153ea6d..2e3ed16db1 100644 --- a/src/lib/dhcpsrv/base_host_data_source.h +++ b/src/lib/dhcpsrv/base_host_data_source.h @@ -7,14 +7,11 @@ #ifndef BASE_HOST_DATA_SOURCE_H #define BASE_HOST_DATA_SOURCE_H +#include #include #include #include - -#include #include -#include - #include namespace isc { @@ -98,8 +95,8 @@ public: /// @param duid client id or NULL if not available, e.g. DHCPv4 client case. /// /// @return Collection of const @c Host objects. - virtual ConstHostCollection getAll(const HWAddrPtr& hwaddr, - const DuidPtr& duid = DuidPtr()) const = 0; + virtual ConstHostCollection + getAll(const HWAddrPtr& hwaddr, const DuidPtr& duid = DuidPtr()) const = 0; /// @brief Return all hosts connected to any subnet for which reservations /// have been made using a specified identifier. @@ -114,9 +111,10 @@ public: /// @param identifier_len Identifier length. /// /// @return Collection of const @c Host objects. - virtual ConstHostCollection getAll(const Host::IdentifierType& identifier_type, - const uint8_t* identifier_begin, - const size_t identifier_len) const = 0; + virtual ConstHostCollection + getAll(const Host::IdentifierType& identifier_type, + const uint8_t* identifier_begin, + const size_t identifier_len) const = 0; /// @brief Returns a collection of hosts using the specified IPv4 address. /// @@ -126,7 +124,8 @@ public: /// @param address IPv4 address for which the @c Host object is searched. /// /// @return Collection of const @c Host objects. - virtual ConstHostCollection getAll4(const asiolink::IOAddress& address) const = 0; + virtual ConstHostCollection + getAll4(const asiolink::IOAddress& address) const = 0; /// @brief Returns a host connected to the IPv4 subnet. /// @@ -142,8 +141,9 @@ public: /// @param duid client id or NULL if not available. /// /// @return Const @c Host object using a specified HW address or DUID. - virtual ConstHostPtr get4(const SubnetID& subnet_id, const HWAddrPtr& hwaddr, - const DuidPtr& duid = DuidPtr()) const = 0; + virtual ConstHostPtr + get4(const SubnetID& subnet_id, const HWAddrPtr& hwaddr, + const DuidPtr& duid = DuidPtr()) const = 0; /// @brief Returns a host connected to the IPv4 subnet. @@ -156,10 +156,11 @@ public: /// /// @return Const @c Host object for which reservation has been made using /// the specified identifier. - virtual ConstHostPtr get4(const SubnetID& subnet_id, - const Host::IdentifierType& identifier_type, - const uint8_t* identifier_begin, - const size_t identifier_len) const = 0; + virtual ConstHostPtr + get4(const SubnetID& subnet_id, + const Host::IdentifierType& identifier_type, + const uint8_t* identifier_begin, + const size_t identifier_len) const = 0; /// @brief Returns a host connected to the IPv4 subnet and having /// a reservation for a specified IPv4 address. @@ -177,8 +178,9 @@ public: /// @param address reserved IPv4 address. /// /// @return Const @c Host object using a specified IPv4 address. - virtual ConstHostPtr get4(const SubnetID& subnet_id, - const asiolink::IOAddress& address) const = 0; + virtual ConstHostPtr + get4(const SubnetID& subnet_id, + const asiolink::IOAddress& address) const = 0; /// @brief Returns a host connected to the IPv6 subnet. /// @@ -194,9 +196,9 @@ public: /// @param duid DUID or NULL if not available. /// /// @return Const @c Host object using a specified HW address or DUID. - virtual ConstHostPtr get6(const SubnetID& subnet_id, - const DuidPtr& duid, - const HWAddrPtr& hwaddr = HWAddrPtr()) const = 0; + virtual ConstHostPtr + get6(const SubnetID& subnet_id, const DuidPtr& duid, + const HWAddrPtr& hwaddr = HWAddrPtr()) const = 0; /// @brief Returns a host connected to the IPv6 subnet. /// @@ -208,10 +210,11 @@ public: /// /// @return Const @c Host object for which reservation has been made using /// the specified identifier. - virtual ConstHostPtr get6(const SubnetID& subnet_id, - const Host::IdentifierType& identifier_type, - const uint8_t* identifier_begin, - const size_t identifier_len) const = 0; + virtual ConstHostPtr + get6(const SubnetID& subnet_id, + const Host::IdentifierType& identifier_type, + const uint8_t* identifier_begin, + const size_t identifier_len) const = 0; /// @brief Returns a host using the specified IPv6 prefix. /// @@ -219,8 +222,8 @@ public: /// @param prefix_len IPv6 prefix length. /// /// @return Const @c Host object using a specified HW address or DUID. - virtual ConstHostPtr get6(const asiolink::IOAddress& prefix, - const uint8_t prefix_len) const = 0; + virtual ConstHostPtr + get6(const asiolink::IOAddress& prefix, const uint8_t prefix_len) const = 0; /// @brief Returns a host connected to the IPv6 subnet and having /// a reservation for a specified IPv6 address or prefix. @@ -307,7 +310,7 @@ public: /// @brief HostDataSource pointer typedef boost::shared_ptr HostDataSourcePtr; -} // namespace dhcp -} // namespace isc +} +} #endif // BASE_HOST_DATA_SOURCE_H diff --git a/src/lib/dhcpsrv/host_mgr.h b/src/lib/dhcpsrv/host_mgr.h index dd5177a3dd..c177f58829 100644 --- a/src/lib/dhcpsrv/host_mgr.h +++ b/src/lib/dhcpsrv/host_mgr.h @@ -337,8 +337,7 @@ private: static boost::scoped_ptr& getHostMgrPtr(); }; - -} // namespace dhcp -} // namespace isc +} +} #endif // HOST_MGR_H diff --git a/src/lib/dhcpsrv/parsers/dhcp_parsers.cc b/src/lib/dhcpsrv/parsers/dhcp_parsers.cc index 1a91cdb357..30995de0d0 100644 --- a/src/lib/dhcpsrv/parsers/dhcp_parsers.cc +++ b/src/lib/dhcpsrv/parsers/dhcp_parsers.cc @@ -523,7 +523,8 @@ SubnetConfigParser::parse(ConstElementPtr subnet) { Subnet::HRMode SubnetConfigParser::hrModeFromText(const std::string& txt) { - if ( (txt.compare("disabled") == 0) || (txt.compare("off") == 0) ) { + if ( (txt.compare("disabled") == 0) || + (txt.compare("off") == 0) ) { return (Subnet::HR_DISABLED); } else if (txt.compare("out-of-pool") == 0) { return (Subnet::HR_OUT_OF_POOL); diff --git a/src/lib/dhcpsrv/subnet.h b/src/lib/dhcpsrv/subnet.h index e11187bfa3..3d91ae8bb9 100644 --- a/src/lib/dhcpsrv/subnet.h +++ b/src/lib/dhcpsrv/subnet.h @@ -306,14 +306,16 @@ public: /// /// @param client_classes list of all classes the client belongs to /// @return true if client can be supported, false otherwise - bool clientSupported(const isc::dhcp::ClientClasses& client_classes) const; + bool + clientSupported(const isc::dhcp::ClientClasses& client_classes) const; /// @brief adds class class_name to the list of supported classes /// /// Also see explanation note in @ref white_list_. /// /// @param class_name client class to be supported by this subnet - void allowClientClass(const isc::dhcp::ClientClass& class_name); + void + allowClientClass(const isc::dhcp::ClientClass& class_name); /// @brief returns the client class white list /// @@ -333,7 +335,8 @@ public: /// performance reasons. /// /// @return whether in-pool host reservations are allowed. - HRMode getHostReservationMode() const { + HRMode + getHostReservationMode() const { return (host_reservation_mode_); } @@ -515,8 +518,8 @@ protected: /// /// See @ref HRMode type for details. HRMode host_reservation_mode_; - private: + /// @brief Pointer to the option data configuration for this subnet. CfgOptionPtr cfg_option_; }; diff --git a/src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.h b/src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.h index c2a77d31b5..a1bbd9a45b 100644 --- a/src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.h +++ b/src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.h @@ -406,8 +406,8 @@ public: LeaseMgr* lmptr_; }; -} // namespace test -} // namespace dhcp -} // namespace isc +}; // namespace test +}; // namespace dhcp +}; // namespace isc #endif