Skip to content

Commit

Permalink
nimble/ll: Remove not needed NULL checks
Browse files Browse the repository at this point in the history
ble_ll_scan_adv_decode_addr is always called with valid inita.
  • Loading branch information
sjanc committed Jan 21, 2020
1 parent 7df04c1 commit daa8be8
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions nimble/controller/src/ble_ll_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1877,10 +1877,6 @@ ble_ll_scan_get_addr_from_ext_adv(uint8_t *rxbuf, struct ble_mbuf_hdr *ble_hdr,
has_adva = true;
}

if (!inita) {
goto done;
}

if (ext_hdr_flags & (1 << BLE_LL_EXT_ADV_TARGETA_BIT)) {
*inita = ext_hdr + i;
*inita_type =
Expand All @@ -1905,10 +1901,6 @@ ble_ll_scan_get_addr_from_ext_adv(uint8_t *rxbuf, struct ble_mbuf_hdr *ble_hdr,
}
}

if (!inita) {
return 0;
}

if (aux_data->flags & BLE_LL_AUX_HAS_TARGETA) {
if (!has_inita) {
*inita = aux_data->targeta;
Expand Down Expand Up @@ -1942,10 +1934,6 @@ ble_ll_scan_adv_decode_addr(uint8_t pdu_type, uint8_t *rxbuf,
*addr_type = ble_ll_get_addr_type(rxbuf[0] & BLE_ADV_PDU_HDR_TXADD_MASK);
*addr = rxbuf + BLE_LL_PDU_HDR_LEN;

if (!inita) {
return 0;
}

if (pdu_type != BLE_ADV_PDU_TYPE_ADV_DIRECT_IND) {
*inita = NULL;
*inita_type = 0;
Expand Down

0 comments on commit daa8be8

Please sign in to comment.