Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5d0398d8 authored by Zach Johnson's avatar Zach Johnson
Browse files

bta_dm_di_cb.p_di_db is never non-null

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Iaf28113061e189eb2e20b2b40e471e82daaff01c
parent 280b7db0
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -897,18 +897,7 @@ void bta_dm_discover(tBTA_DM_MSG* p_data) {
 *
 ******************************************************************************/
static void bta_dm_disable_search_and_disc(void) {
  tBTA_DM_DI_DISC_CMPL di_disc;

  if (bta_dm_search_cb.state != BTA_DM_SEARCH_IDLE) bta_dm_search_cancel();

  if (bta_dm_di_cb.p_di_db != NULL) {
    memset(&di_disc, 0, sizeof(tBTA_DM_DI_DISC_CMPL));
    di_disc.bd_addr = bta_dm_search_cb.peer_bdaddr;
    di_disc.result = BTA_FAILURE;

    bta_dm_di_cb.p_di_db = NULL;
    bta_dm_search_cb.p_search_cback(BTA_DM_DI_DISC_CMPL_EVT, NULL);
  }
}

/*******************************************************************************
+0 −1
Original line number Diff line number Diff line
@@ -349,7 +349,6 @@ typedef struct {

/* DI control block */
typedef struct {
  tSDP_DISCOVERY_DB* p_di_db;         /* pointer to the DI discovery database */
  uint8_t di_num;                     /* total local DI record number */
  uint32_t di_handle[BTA_DI_NUM_MAX]; /* local DI record handle, the first one
                                         is primary record */