From: Stephen Morris Date: Wed, 28 Nov 2012 13:03:44 +0000 (+0000) Subject: [2312] Fix some typos and missing Doxygen keywords X-Git-Tag: bind10-1.0.0-beta-release~46^2~18^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ee7dbbde6311ec0e9519169871aa182dd7cc1440;p=thirdparty%2Fkea.git [2312] Fix some typos and missing Doxygen keywords --- diff --git a/src/lib/dhcp/option6_int.h b/src/lib/dhcp/option6_int.h index 9b116e0ae4..e359b36479 100644 --- a/src/lib/dhcp/option6_int.h +++ b/src/lib/dhcp/option6_int.h @@ -89,7 +89,7 @@ public: // Depending on the data type length we use different utility functions // writeUint16 or writeUint32 which write the data in the network byte // order to the provided buffer. The same functions can be safely used - // for either unsiged or signed integers so there is not need to create + // for either unsigned or signed integers so there is not need to create // special cases for intX_t types. switch (OptionDataTypeTraits::len) { case 1: @@ -128,7 +128,7 @@ public: // Depending on the data type length we use different utility functions // readUint16 or readUint32 which read the data laid in the network byte // order from the provided buffer. The same functions can be safely used - // for either unsiged or signed integers so there is not need to create + // for either unsigned or signed integers so there is not need to create // special cases for intX_t types. int data_size_len = OptionDataTypeTraits::len; switch (data_size_len) { diff --git a/src/lib/dhcp/option6_int_array.h b/src/lib/dhcp/option6_int_array.h index c37c107b7c..3b642137fa 100644 --- a/src/lib/dhcp/option6_int_array.h +++ b/src/lib/dhcp/option6_int_array.h @@ -118,7 +118,7 @@ public: // Depending on the data type length we use different utility functions // writeUint16 or writeUint32 which write the data in the network byte // order to the provided buffer. The same functions can be safely used - // for either unsiged or signed integers so there is not need to create + // for either unsigned or signed integers so there is not need to create // special cases for intX_t types. switch (OptionDataTypeTraits::len) { case 1: @@ -164,7 +164,7 @@ public: // Depending on the data type length we use different utility functions // readUint16 or readUint32 which read the data laid in the network byte // order from the provided buffer. The same functions can be safely used - // for either unsiged or signed integers so there is not need to create + // for either unsigned or signed integers so there is not need to create // special cases for intX_t types. int data_size_len = OptionDataTypeTraits::len; switch (data_size_len) { diff --git a/src/lib/dhcp/option_custom.h b/src/lib/dhcp/option_custom.h index 094466e3dd..8cefcd0cc0 100644 --- a/src/lib/dhcp/option_custom.h +++ b/src/lib/dhcp/option_custom.h @@ -42,7 +42,6 @@ public: /// /// @param def option definition. /// @param u specifies universe (V4 or V6). - /// @param def option definition. /// @param data content of the option. /// /// @throw OutOfRange if option buffer is truncated. @@ -112,7 +111,6 @@ public: // Get the option definition type. OptionDataType data_type = definition_.getType(); - // if (data_type == OPT_RECORD_TYPE) { const OptionDefinition::RecordFieldsCollection& record_fields = definition_.getRecordFields(); @@ -154,15 +152,15 @@ public: virtual void unpack(OptionBufferConstIter begin, OptionBufferConstIter end); - /// Returns string representation of the option. + /// @brief Returns string representation of the option. /// /// @param indent number of spaces before printed text. /// /// @return string with text representation. virtual std::string toText(int indent = 0); - /// Returns length of the complete option (data length + DHCPv4/DHCPv6 - /// option header) + /// @brief Returns length of the complete option (data length + + /// DHCPv4/DHCPv6 option header) /// /// @return length of the option virtual uint16_t len(); @@ -192,6 +190,8 @@ private: /// @brief Check if data field index is valid. /// + /// @param index Data field index to check. + /// /// @throw isc::OutOfRange if index is out of range. void checkIndex(const uint32_t index) const; diff --git a/src/lib/dhcp/option_data_types.cc b/src/lib/dhcp/option_data_types.cc index 866f275216..c469d2bf88 100644 --- a/src/lib/dhcp/option_data_types.cc +++ b/src/lib/dhcp/option_data_types.cc @@ -160,7 +160,7 @@ void OptionDataTypeUtil::writeBinary(const std::string& hex_str, std::vector& buf) { // Binary value means that the value is encoded as a string - // of hexadecimal deigits. We need to decode this string + // of hexadecimal digits. We need to decode this string // to the binary format here. OptionBuffer binary; try { @@ -186,7 +186,7 @@ OptionDataTypeUtil::readBool(const std::vector& buf) { return (false); } isc_throw(BadDataTypeCast, "unable to read the buffer as boolean" - << " value. Inavlid value " << static_cast(buf[0])); + << " value. Invalid value " << static_cast(buf[0])); } void diff --git a/src/lib/dhcp/option_data_types.h b/src/lib/dhcp/option_data_types.h index f5efa0f301..cd8176d85f 100644 --- a/src/lib/dhcp/option_data_types.h +++ b/src/lib/dhcp/option_data_types.h @@ -192,12 +192,12 @@ public: /// @brief Get data type buffer length. /// - /// This functionm returs the size of a particular data type. + /// This function returns the size of a particular data type. /// Values retured by this function correspond to the data type /// sizes defined in OptionDataTypeTraits (IPV4_ADDRESS_TYPE and /// IPV6_ADDRESS_TYPE are exceptions here) so they rather indicate /// the fixed length of the data being written into the buffer, - /// not the sizeof the particular data type. Thus for data types + /// not the size of the particular data type. Thus for data types /// such as string, binary etc. for which the buffer length can't /// be determined this function returns 0. /// In addition, this function returns the data sizes for @@ -280,7 +280,7 @@ public: return (value); } - /// @brief Write integer or unsiged integer value into a buffer. + /// @brief Write integer or unsigned integer value into a buffer. /// /// @param value an integer value to be written into a buffer. /// @param [out] buf output buffer. @@ -318,7 +318,7 @@ public: static void readString(const std::vector& buf, std::string& value); - /// @brief Write utf8-encoded string into a buffer. + /// @brief Write UTF8-encoded string into a buffer. /// /// @param value string value to be written into a buffer. /// @param [out] buf output buffer. diff --git a/src/lib/dhcp/option_definition.cc b/src/lib/dhcp/option_definition.cc index b61a4ea7f5..20dabfa514 100644 --- a/src/lib/dhcp/option_definition.cc +++ b/src/lib/dhcp/option_definition.cc @@ -223,7 +223,7 @@ OptionDefinition::validate() const { err_str << "binary data field can't be laid before data fields" << " of other types."; } - /// Empty typy is not allowed within a record. + /// Empty type is not allowed within a record. if (*it == OPT_EMPTY_TYPE) { err_str << "empty data type can't be stored as a field in an" << " option record."; diff --git a/src/lib/dhcp/tests/option_custom_unittest.cc b/src/lib/dhcp/tests/option_custom_unittest.cc index e26ff6892e..abfa9ecad5 100644 --- a/src/lib/dhcp/tests/option_custom_unittest.cc +++ b/src/lib/dhcp/tests/option_custom_unittest.cc @@ -50,7 +50,7 @@ public: } } - /// @brief Write integer (signed or unsiged) into a buffer. + /// @brief Write integer (signed or unsigned) into a buffer. /// /// @param value integer value. /// @param [out] buf output buffer. @@ -159,8 +159,8 @@ TEST_F(OptionCustomTest, binaryData) { EXPECT_TRUE(std::equal(buf_in.begin(), buf_in.end(), buf_out.begin())); } -// The purpose of this test is to verify that the option definition comprising -// single boolean value can be used to create an instance of custom option. +// The purpose of this test is to verify that an option definition comprising +// a single boolean value can be used to create an instance of custom option. TEST_F(OptionCustomTest, booleanData) { OptionDefinition opt_def("OPTION_FOO", 1000, "boolean");