From: Francis Dupont Date: Fri, 6 Oct 2017 11:07:09 +0000 (+0200) Subject: [5362] Fixed sizeof(bool) incorrect uses X-Git-Tag: trac5297_base~9^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3961088f1f16851748f3df4b85aaf4475c6fac10;p=thirdparty%2Fkea.git [5362] Fixed sizeof(bool) incorrect uses --- diff --git a/src/lib/dhcp/option6_status_code.cc b/src/lib/dhcp/option6_status_code.cc index b4cb2c4dbb..e24539fbc9 100644 --- a/src/lib/dhcp/option6_status_code.cc +++ b/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 diff --git a/src/lib/dhcp/option_data_types.h b/src/lib/dhcp/option_data_types.h index ffc6669dcb..358dcc0728 100644 --- a/src/lib/dhcp/option_data_types.h +++ b/src/lib/dhcp/option_data_types.h @@ -109,7 +109,7 @@ struct OptionDataTypeTraits { template<> struct OptionDataTypeTraits { 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; };