From 92f258e9277df357c74c1c54e5fe7a90aa1a7dd7 Mon Sep 17 00:00:00 2001 From: xiongweichao Date: Fri, 12 Nov 2021 11:10:03 +0800 Subject: [PATCH] Logically dead code --- components/bt/host/bluedroid/stack/btm/btm_ble_gap.c | 7 +++---- components/bt/host/bluedroid/stack/l2cap/l2c_api.c | 8 ++------ 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/components/bt/host/bluedroid/stack/btm/btm_ble_gap.c b/components/bt/host/bluedroid/stack/btm/btm_ble_gap.c index f8ea6bb9dd..129ef4a5d5 100644 --- a/components/bt/host/bluedroid/stack/btm/btm_ble_gap.c +++ b/components/bt/host/bluedroid/stack/btm/btm_ble_gap.c @@ -1765,8 +1765,10 @@ tBTM_STATUS BTM_UpdateBleDuplicateExceptionalList(uint8_t subcode, uint32_t type tBTM_UPDATE_DUPLICATE_EXCEPTIONAL_LIST_CMPL_CBACK update_exceptional_list_cmp_cb) { tBTM_BLE_CB *ble_cb = &btm_cb.ble_ctr_cb; - ble_cb->update_exceptional_list_cmp_cb = update_exceptional_list_cmp_cb; tBTM_STATUS status = BTM_NO_RESOURCES; + + ble_cb->update_exceptional_list_cmp_cb = update_exceptional_list_cmp_cb; + if (!controller_get_interface()->supports_ble()) { return BTM_ILLEGAL_VALUE; } @@ -1801,9 +1803,6 @@ tBTM_STATUS BTM_UpdateBleDuplicateExceptionalList(uint8_t subcode, uint32_t type //do nothing break; } - if(status == BTM_ILLEGAL_VALUE) { - return status; - } status = BTM_VendorSpecificCommand(HCI_VENDOR_BLE_UPDATE_DUPLICATE_EXCEPTIONAL_LIST, 1 + 4 + BD_ADDR_LEN, device_info_array, NULL); if(status == BTM_CMD_STARTED) { diff --git a/components/bt/host/bluedroid/stack/l2cap/l2c_api.c b/components/bt/host/bluedroid/stack/l2cap/l2c_api.c index 4886f465ab..247503d094 100644 --- a/components/bt/host/bluedroid/stack/l2cap/l2c_api.c +++ b/components/bt/host/bluedroid/stack/l2cap/l2c_api.c @@ -1718,13 +1718,9 @@ BOOLEAN L2CA_ConnectFixedChnl (UINT16 fixed_cid, BD_ADDR rem_bda, tBLE_ADDR_TYPE return TRUE; } -#if BLE_INCLUDED == TRUE (*l2cb.fixed_reg[fixed_cid - L2CAP_FIRST_FIXED_CHNL].pL2CA_FixedConn_Cb) - (fixed_cid, p_lcb->remote_bd_addr, TRUE, 0, p_lcb->transport); -#else - (*l2cb.fixed_reg[fixed_cid - L2CAP_FIRST_FIXED_CHNL].pL2CA_FixedConn_Cb) - (fixed_cid, p_lcb->remote_bd_addr, TRUE, 0, BT_TRANSPORT_BR_EDR); -#endif + (fixed_cid, p_lcb->remote_bd_addr, TRUE, 0, transport); + return TRUE; }