diff -r bad0cc58d154 -r c74b3d9f6b9e eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_peap_tlv_header.cpp --- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_peap_tlv_header.cpp Tue Aug 31 15:16:37 2010 +0300 +++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_peap_tlv_header.cpp Wed Sep 01 12:23:57 2010 +0100 @@ -16,7 +16,7 @@ */ /* -* %version: % +* %version: 8 % */ // This is enumeration of EAPOL source code. @@ -239,9 +239,8 @@ EAP_ASSERT(flag_tlv_type_data != 0); flag_tlv_type_data[0] = static_cast( - (flag_tlv_type_data[0] & (m_flag_mask_mandatory_tlv|m_flag_mask_reserved)) - | (((type & 0xff00) >> 8) & ~(m_flag_mask_mandatory_tlv|m_flag_mask_reserved))); - + flag_tlv_type_data[0] & (m_flag_mask_mandatory_tlv|m_flag_mask_reserved) + | ((type & 0xff00) >> 8) & ~(m_flag_mask_mandatory_tlv|m_flag_mask_reserved)); flag_tlv_type_data[1] = static_cast(type & 0x00ff); } @@ -255,11 +254,11 @@ if (reserved == true) { - flag_tlv_type_data[0] = static_cast(flag_tlv_type_data[0] | m_flag_mask_reserved); + flag_tlv_type_data[0] |= m_flag_mask_reserved; } else { - flag_tlv_type_data[0] = static_cast(flag_tlv_type_data[0] & ~m_flag_mask_reserved); + flag_tlv_type_data[0] &= ~m_flag_mask_reserved; } } @@ -273,11 +272,11 @@ if (mandatory_when_true == true) { - flag_tlv_type_data[0] = static_cast(flag_tlv_type_data[0] | m_flag_mask_mandatory_tlv); + flag_tlv_type_data[0] |= m_flag_mask_mandatory_tlv; } else { - flag_tlv_type_data[0] = static_cast(flag_tlv_type_data[0] & ~m_flag_mask_mandatory_tlv); + flag_tlv_type_data[0] &= ~m_flag_mask_mandatory_tlv; } }