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

Commit ac19d422 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Remove unreachable code"

parents e2fbecd5 618b5fa5
Loading
Loading
Loading
Loading
+0 −5
Original line number Original line Diff line number Diff line
@@ -1060,11 +1060,6 @@ bool bta_gattc_cache_load(tBTA_GATTC_CLCB* p_clcb) {
    goto done;
    goto done;
  }
  }


  if (num_attr > 0xFFFF) {
    LOG(ERROR) << __func__ << ": more than 0xFFFF GATT attributes: " << fname;
    goto done;
  }

  attr = (tBTA_GATTC_NV_ATTR*)osi_malloc(sizeof(tBTA_GATTC_NV_ATTR) * num_attr);
  attr = (tBTA_GATTC_NV_ATTR*)osi_malloc(sizeof(tBTA_GATTC_NV_ATTR) * num_attr);


  if (fread(attr, sizeof(tBTA_GATTC_NV_ATTR), num_attr, fd) != num_attr) {
  if (fread(attr, sizeof(tBTA_GATTC_NV_ATTR), num_attr, fd) != num_attr) {
+2 −2
Original line number Original line Diff line number Diff line
@@ -496,8 +496,8 @@ void BTM_BleReadScanReports(tBTM_BLE_BATCH_SCAN_MODE scan_mode,


  /* Check only for modes, as scan reports can be called after disabling batch
  /* Check only for modes, as scan reports can be called after disabling batch
   * scan */
   * scan */
  if (read_scan_mode < 0 || (scan_mode != BTM_BLE_BATCH_SCAN_MODE_PASS &&
  if (scan_mode != BTM_BLE_BATCH_SCAN_MODE_PASS &&
                             scan_mode != BTM_BLE_BATCH_SCAN_MODE_ACTI)) {
      scan_mode != BTM_BLE_BATCH_SCAN_MODE_ACTI) {
    BTM_TRACE_ERROR("Illegal read scan params: %d, %d, %d", read_scan_mode,
    BTM_TRACE_ERROR("Illegal read scan params: %d, %d, %d", read_scan_mode,
                    scan_mode, ble_batchscan_cb.cur_state);
                    scan_mode, ble_batchscan_cb.cur_state);
    cb.Run(BTM_ILLEGAL_VALUE, 0, 0, {});
    cb.Run(BTM_ILLEGAL_VALUE, 0, 0, {});