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

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

Merge "PAN: Fix issues reported by Static Analysis Tool"

parents e9444eb9 b7d6b7ab
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -183,10 +183,10 @@ void bta_pan_ci_rx_writebuf(uint16_t handle, const RawAddress& dst,
 ******************************************************************************/
BT_HDR* bta_pan_ci_readbuf(uint16_t handle, RawAddress& src, RawAddress& dst,
                           uint16_t* p_protocol, bool* p_ext, bool* p_forward) {
  tBTA_PAN_SCB* p_scb;
  tBTA_PAN_SCB* p_scb = bta_pan_scb_by_handle(handle);
  BT_HDR* p_buf;

  p_scb = bta_pan_scb_by_handle(handle);
  if (p_scb == NULL) return NULL;

  p_buf = (BT_HDR*)fixed_queue_try_dequeue(p_scb->data_queue);
  if (p_buf != NULL) {
+5 −6
Original line number Diff line number Diff line
@@ -51,7 +51,8 @@ enum {
  BTA_PAN_CONN_OPEN,
  BTA_PAN_CONN_CLOSE,
  BTA_PAN_FREE_BUF,
  BTA_PAN_IGNORE
  BTA_PAN_IGNORE,
  BTA_PAN_MAX_ACTIONS
};

/* type for action functions */
@@ -184,11 +185,9 @@ static void bta_pan_sm_execute(tBTA_PAN_SCB* p_scb, uint16_t event,
  /* execute action functions */
  for (i = 0; i < BTA_PAN_ACTIONS; i++) {
    action = state_table[event][i];
    if (action != BTA_PAN_IGNORE) {
    CHECK(action < BTA_PAN_MAX_ACTIONS);
    if (action == BTA_PAN_IGNORE) continue;
    (*bta_pan_action[action])(p_scb, p_data);
    } else {
      break;
    }
  }
}