You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ja...@apache.org on 2020/01/21 08:35:28 UTC
[mynewt-nimble] branch master updated: nimble/ll: Remove not needed
NULL checks
This is an automated email from the ASF dual-hosted git repository.
janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
The following commit(s) were added to refs/heads/master by this push:
new daa8be8 nimble/ll: Remove not needed NULL checks
daa8be8 is described below
commit daa8be8a39a3913eea4bff0659df9181c44819d4
Author: Szymon Janc <sz...@codecoup.pl>
AuthorDate: Mon Jan 20 10:12:19 2020 +0100
nimble/ll: Remove not needed NULL checks
ble_ll_scan_adv_decode_addr is always called with valid inita.
---
nimble/controller/src/ble_ll_scan.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/nimble/controller/src/ble_ll_scan.c b/nimble/controller/src/ble_ll_scan.c
index 26e7c07..2dd88e9 100644
--- a/nimble/controller/src/ble_ll_scan.c
+++ b/nimble/controller/src/ble_ll_scan.c
@@ -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 =
@@ -1905,10 +1901,6 @@ done:
}
}
- if (!inita) {
- return 0;
- }
-
if (aux_data->flags & BLE_LL_AUX_HAS_TARGETA) {
if (!has_inita) {
*inita = aux_data->targeta;
@@ -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;