OSDN Git Service

Use strict return type HCI_SNIFF_SUB_RATE_SUPPORTED
authorChris Manton <cmanton@google.com>
Wed, 9 Dec 2020 16:51:56 +0000 (08:51 -0800)
committerChris Manton <cmanton@google.com>
Sun, 13 Dec 2020 05:39:46 +0000 (21:39 -0800)
Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: Ieaa3b111093e170d4cca3eab327878f43e92a89b

stack/include/hcidefs.h

index 32ecf11..f7e9fb6 100644 (file)
@@ -955,7 +955,7 @@ typedef struct {
 #define HCI_3_SLOT_EDR_ACL_SUPPORTED(x) ((x)[4] & 0x80)
 
 #define HCI_5_SLOT_EDR_ACL_SUPPORTED(x) ((x)[5] & 0x01)
-#define HCI_SNIFF_SUB_RATE_SUPPORTED(x) ((x)[5] & 0x02)
+#define HCI_SNIFF_SUB_RATE_SUPPORTED(x) (static_cast<bool>((x)[5] & 0x02))
 #define HCI_ATOMIC_ENCRYPT_SUPPORTED(x) ((x)[5] & 0x04)
 #define HCI_LMP_AFH_CAP_MASTR_SUPPORTED(x) ((x)[5] & 0x08)
 #define HCI_LMP_AFH_CLASS_MASTR_SUPPORTED(x) ((x)[5] & 0x10)