Browse Source

[2312] Fix some typos and missing Doxygen keywords

Stephen Morris 12 years ago
parent
commit
ee7dbbde63

+ 2 - 2
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<T>::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<T>::len;
         switch (data_size_len) {

+ 2 - 2
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<T>::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<T>::len;
             switch (data_size_len) {

+ 5 - 5
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;
 

+ 2 - 2
src/lib/dhcp/option_data_types.cc

@@ -160,7 +160,7 @@ void
 OptionDataTypeUtil::writeBinary(const std::string& hex_str,
                                 std::vector<uint8_t>& 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<uint8_t>& buf) {
         return (false);
     }
     isc_throw(BadDataTypeCast, "unable to read the buffer as boolean"
-              << " value. Inavlid value " << static_cast<int>(buf[0]));
+              << " value. Invalid value " << static_cast<int>(buf[0]));
 }
 
 void

+ 4 - 4
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<uint8_t>& 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.

+ 1 - 1
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.";

+ 3 - 3
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");