diff --git a/features/FEATURE_BLE/source/generic/GenericGap.cpp b/features/FEATURE_BLE/source/generic/GenericGap.cpp index c1f47f0f8d..faa78eb4d3 100644 --- a/features/FEATURE_BLE/source/generic/GenericGap.cpp +++ b/features/FEATURE_BLE/source/generic/GenericGap.cpp @@ -230,7 +230,7 @@ static bool is_prand_24_bits_valid(const BLEProtocol::AddressBytes_t address) static bool is_random_static_address(const BLEProtocol::AddressBytes_t address) { // top two msb bits shall be equal to 0b11. - if (((address[5] >> 6) & 0xC0) != 0xC0) { + if ((address[5] & 0xC0) != 0xC0) { return false; } @@ -244,7 +244,7 @@ static bool is_random_private_non_resolvable_address( const BLEProtocol::AddressBytes_t address ) { // top two msb bits shall be equal to 0b00. - if (((address[5] >> 6) & 0xC0) != 0x00) { + if ((address[5] & 0xC0) != 0x00) { return false; } @@ -258,7 +258,7 @@ static bool is_random_private_resolvable_address( const BLEProtocol::AddressBytes_t address ) { // top two msb bits shall be equal to 0b01. - if (((address[5] >> 6) & 0xC0) != 0x40) { + if ((address[5] & 0xC0) != 0x40) { return false; }