Browse Source

[trac3576] Correct some strings, remvoe some extra whitespace

Shawn Routhier 9 years ago
parent
commit
e36cf3994b

+ 6 - 10
src/lib/dhcp/option_opaque_data_tuples.cc

@@ -41,7 +41,6 @@ OptionOpaqueDataTuples::pack(isc::util::OutputBuffer& buf) {
          it != tuples_.end(); ++it) {
         it->pack(buf);
     }
-
 }
 
 void
@@ -69,7 +68,7 @@ OptionOpaqueDataTuples::addTuple(const OpaqueDataTuple& tuple) {
     if (tuple.getLengthFieldType() != getLengthFieldType()) {
         isc_throw(isc::BadValue, "attempted to add opaque data tuple having"
                   " invalid size of the length field "
-                  << tuple.getDataFieldSize() << " to Vendor Class option");
+                  << tuple.getDataFieldSize() << " to opaque data tuple option");
     }
 
     tuples_.push_back(tuple);
@@ -80,13 +79,13 @@ void
 OptionOpaqueDataTuples::setTuple(const size_t at, const OpaqueDataTuple& tuple) {
     if (at >= getTuplesNum()) {
         isc_throw(isc::OutOfRange, "attempted to set an opaque data for the"
-                  " vendor option at position " << at << " which is out of"
-                  " range");
+                  " opaque data tuple option at position " << at << " which"
+                  " is out of range");
 
     } else if (tuple.getLengthFieldType() != getLengthFieldType()) {
         isc_throw(isc::BadValue, "attempted to set opaque data tuple having"
                   " invalid size of the length field "
-                  << tuple.getDataFieldSize() << " to Vendor Class option");
+                  << tuple.getDataFieldSize() << " to opaque data tuple option");
     }
 
     tuples_[at] = tuple;
@@ -96,8 +95,8 @@ OpaqueDataTuple
 OptionOpaqueDataTuples::getTuple(const size_t at) const {
     if (at >= getTuplesNum()) {
         isc_throw(isc::OutOfRange, "attempted to get an opaque data for the"
-                  " vendor option at position " << at << " which is out of"
-                  " range. There are only " << getTuplesNum() << " tuples");
+                  " opaque data tuple option at position " << at << " which is"
+                  " out of range. There are only " << getTuplesNum() << " tuples");
     }
     return (tuples_[at]);
 }
@@ -115,7 +114,6 @@ OptionOpaqueDataTuples::hasTuple(const std::string& tuple_str) const {
     return (false);
 }
 
-
 uint16_t
 OptionOpaqueDataTuples::len() {
     // The option starts with the header.
@@ -136,8 +134,6 @@ OptionOpaqueDataTuples::toText(int indent) {
     // Apply indentation
     s << std::string(indent, ' ');
 
-
-
     // Print type and length
     s << "type=" << getType() << ", len=" << len() - getHeaderLen() << std::dec;
     // Iterate over all tuples and print their size and contents.

+ 4 - 4
src/lib/dhcp/option_opaque_data_tuples.h

@@ -53,7 +53,7 @@ public:
     /// be used for an option such as DHCPv6 Bootfile Parameters (60).
     ///
     /// @param u universe (v4 or v6).
-    /// @param type option type 
+    /// @param type option type
     OptionOpaqueDataTuples(Option::Universe u, const uint16_t type);
 
     /// @brief Constructor.
@@ -62,7 +62,7 @@ public:
     /// on-wire data. It may throw an exception if the @c unpack method throws.
     ///
     /// @param u universe (v4 or v6)
-    /// @param type option type 
+    /// @param type option type
     /// @param begin Iterator pointing to the beginning of the buffer holding an
     /// option.
     /// @param end Iterator pointing to the end of the buffer holding an option.
@@ -146,7 +146,7 @@ private:
     /// This function returns the length field type which should be used
     /// for the opaque data tuples being added to this option.
     /// Currently this class is only used for a DHCPv6 option it may be expanded
-    /// for DHCPv4 in the future 
+    /// for DHCPv4 in the future.
     ///
     /// @return Tuple length field type for the universe this option belongs to.
     OpaqueDataTuple::LengthFieldType getLengthFieldType() const {
@@ -155,7 +155,7 @@ private:
 
     /// @brief Returns minimal length of the option for the given universe.
     /// Currently this class is only used for a DHCPv6 option it may be expanded
-    /// for DHCPv4 in the future 
+    /// for DHCPv4 in the future.
     uint16_t getMinimalLength() const {
         return (4);
     }

+ 1 - 4
src/lib/dhcp/tests/option_opaque_data_tuples_unittest.cc

@@ -179,9 +179,7 @@ TEST(OptionOpaqueDataTuples, unpack6) {
 // is correctly parsed.
 TEST(OptionOpaqueDataTuples, unpack6EmptyTuple) {
     // Prepare data to decode.
-    const uint8_t buf_data[] = {
-        0x00, 0x00        // tuple length is 0
-    };
+    const uint8_t buf_data[] = {0x00, 0x00}; // tuple length is 0
     OptionBuffer buf(buf_data, buf_data + sizeof(buf_data));
 
     OptionOpaqueDataTuplesPtr data_tuple;
@@ -255,4 +253,3 @@ TEST(OptionOpaqueDataTuples, toText6) {
 }
 
 } // end of anonymous namespace
-