From 3961088f1f16851748f3df4b85aaf4475c6fac10 Mon Sep 17 00:00:00 2001 From: Francis Dupont Date: Fri, 6 Oct 2017 13:07:09 +0200 Subject: [PATCH] [5362] Fixed sizeof(bool) incorrect uses --- src/lib/dhcp/option6_status_code.cc | 2 +- src/lib/dhcp/option_data_types.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; }; -- 2.47.2