diff --git a/subsys/bluetooth/host/hci_core.h b/subsys/bluetooth/host/hci_core.h index 821d6ec5ea3..f4725c854ff 100644 --- a/subsys/bluetooth/host/hci_core.h +++ b/subsys/bluetooth/host/hci_core.h @@ -140,25 +140,21 @@ extern const struct bt_conn_auth_cb *bt_auth; static inline bool bt_addr_le_is_rpa(const bt_addr_le_t *addr) { - if (addr->type != BT_ADDR_LE_RANDOM) + if (addr->type != BT_ADDR_LE_RANDOM) { return false; + } - if ((addr->a.val[5] & 0xc0) == 0x40) - return true; - - return false; + return ((addr->a.val[5] & 0xc0) == 0x40); } static inline bool bt_addr_le_is_identity(const bt_addr_le_t *addr) { - if (addr->type == BT_ADDR_LE_PUBLIC) + if (addr->type == BT_ADDR_LE_PUBLIC) { return true; + } /* Check for Random Static address type */ - if ((addr->a.val[5] & 0xc0) == 0xc0) - return true; - - return false; + return ((addr->a.val[5] & 0xc0) == 0xc0); } static inline bool bt_le_conn_params_valid(uint16_t min, uint16_t max,