]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5362] Fixed sizeof(bool) incorrect uses
authorFrancis Dupont <fdupont@isc.org>
Fri, 6 Oct 2017 11:07:09 +0000 (13:07 +0200)
committerFrancis Dupont <fdupont@isc.org>
Fri, 6 Oct 2017 11:07:09 +0000 (13:07 +0200)
src/lib/dhcp/option6_status_code.cc
src/lib/dhcp/option_data_types.h

index b4cb2c4dbba869b5bfbe79cca44460dfc4e04bd8..e24539fbc932972fa2392515086f612c8be5d45e 100644 (file)
@@ -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
index ffc6669dcbf0c05dfa965c8f5edec136302ab3e4..358dcc07287ab1a1580ccf5b7ccc7b098f79c5aa 100644 (file)
@@ -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;
 };