From 1c2dfdf34d54dd6091c3cbacd84dc9709e6a1f75 Mon Sep 17 00:00:00 2001 From: Chris Manton Date: Wed, 26 Aug 2020 08:58:37 -0700 Subject: [PATCH] Slightly Streamline l2c_link_hci_conn_comp Towards readable code Bug: 163134718 Tag: #refactor Test: compile & verify basic functions working Change-Id: I7e9838603d8edb00227e7e392424048ac8643adf --- stack/l2cap/l2c_link.cc | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/stack/l2cap/l2c_link.cc b/stack/l2cap/l2c_link.cc index 1c697c09e..e646c7ce0 100644 --- a/stack/l2cap/l2c_link.cc +++ b/stack/l2cap/l2c_link.cc @@ -125,7 +125,6 @@ void l2c_link_hci_conn_comp(uint8_t status, uint16_t handle, tL2C_CONN_INFO ci; tL2C_LCB* p_lcb; tL2C_CCB* p_ccb; - tBTM_SEC_DEV_REC* p_dev_info = NULL; /* Save the parameters */ ci.status = status; @@ -170,13 +169,7 @@ void l2c_link_hci_conn_comp(uint8_t status, uint16_t handle, l2cu_send_peer_info_req(p_lcb, L2CAP_EXTENDED_FEATURES_INFO_TYPE); /* Tell BTM Acl management about the link */ - p_dev_info = btm_find_dev(p_bda); - if (p_dev_info != NULL) - btm_acl_created(ci.bd_addr, handle, p_lcb->LinkRole(), - BT_TRANSPORT_BR_EDR); - else - btm_acl_created(ci.bd_addr, handle, p_lcb->LinkRole(), - BT_TRANSPORT_BR_EDR); + btm_acl_created(ci.bd_addr, handle, p_lcb->LinkRole(), BT_TRANSPORT_BR_EDR); BTM_SetLinkSuperTout(ci.bd_addr, acl_get_link_supervision_timeout()); -- 2.11.0