Skip to content

Commit c706a09

Browse files
cvinayakcarlescufi
authored andcommitted
Bluetooth: Controller: Rename drop to accept to avoid negations
Rename the variable drop to accept to avoid multiple use of negations in the implementation. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent 471543e commit c706a09

File tree

1 file changed

+10
-9
lines changed
  • subsys/bluetooth/controller/hci

1 file changed

+10
-9
lines changed

subsys/bluetooth/controller/hci/hci.c

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6167,7 +6167,7 @@ static void le_per_adv_sync_report(struct pdu_data *pdu_data,
61676167
uint8_t hdr_len;
61686168
uint8_t *ptr;
61696169
int8_t rssi;
6170-
bool drop;
6170+
bool accept;
61716171

61726172
if (!(event_mask & BT_EVT_MASK_LE_META_EVENT) ||
61736173
(!(le_event_mask & BT_EVT_MASK_LE_PER_ADVERTISING_REPORT) &&
@@ -6303,17 +6303,18 @@ static void le_per_adv_sync_report(struct pdu_data *pdu_data,
63036303
/* FIXME: Use correct data status else chain PDU report will
63046304
* be filtered out.
63056305
*/
6306-
drop = !ftr->sync_rx_enabled ||
6307-
(sync->nodups && dup_found(PDU_ADV_TYPE_EXT_IND,
6308-
sync->peer_id_addr_type,
6309-
sync->peer_id_addr,
6310-
DUP_EXT_ADV_MODE_PERIODIC,
6311-
adi, 0U));
6306+
accept = ftr->sync_rx_enabled &&
6307+
(!sync->nodups ||
6308+
!dup_found(PDU_ADV_TYPE_EXT_IND,
6309+
sync->peer_id_addr_type,
6310+
sync->peer_id_addr,
6311+
DUP_EXT_ADV_MODE_PERIODIC,
6312+
adi, 0U));
63126313
#endif /* CONFIG_BT_CTLR_DUP_FILTER_LEN > 0 &&
63136314
* CONFIG_BT_CTLR_SYNC_PERIODIC_ADI_SUPPORT
63146315
*/
63156316
} else {
6316-
drop = !ftr->sync_rx_enabled;
6317+
accept = ftr->sync_rx_enabled;
63176318
}
63186319

63196320
data_len_max = ADV_REPORT_EVT_MAX_LEN -
@@ -6322,7 +6323,7 @@ static void le_per_adv_sync_report(struct pdu_data *pdu_data,
63226323

63236324
evt_buf = buf;
63246325

6325-
if ((le_event_mask & BT_EVT_MASK_LE_PER_ADVERTISING_REPORT) && !drop) {
6326+
if ((le_event_mask & BT_EVT_MASK_LE_PER_ADVERTISING_REPORT) && accept) {
63266327
do {
63276328
struct bt_hci_evt_le_per_advertising_report *sep;
63286329
uint8_t data_len_frag;

0 commit comments

Comments
 (0)