Browse Source

[master] Merged trac5362 (sizeof(bool))

Francis Dupont 7 years ago
parent
commit
4cc8e6ec00
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/lib/dhcp/option6_status_code.cc
  2. 1 1
      src/lib/dhcp/option_data_types.h

+ 1 - 1
src/lib/dhcp/option6_status_code.cc

@@ -195,7 +195,7 @@ Option4SlpServiceScope::unpack(OptionBufferConstIter begin, OptionBufferConstIte
 
 uint16_t
 Option4SlpServiceScope::len() const {
-    return (getHeaderLen() + sizeof(bool) + scope_list_.size());
+    return (getHeaderLen() + sizeof(uint8_t) + scope_list_.size());
 }
 
 std::string

+ 1 - 1
src/lib/dhcp/option_data_types.h

@@ -109,7 +109,7 @@ struct OptionDataTypeTraits<OptionBuffer> {
 template<>
 struct OptionDataTypeTraits<bool> {
     static const bool valid = true;
-    static const int len = sizeof(bool);
+    static const int len = sizeof(uint8_t);
     static const bool integer_type = false;
     static const OptionDataType type = OPT_BOOLEAN_TYPE;
 };