From 85076d74c48f730f7edc89eab68d1b753e710a5e Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Fri, 14 Aug 2020 17:18:26 +0200 Subject: [PATCH] gap: improve name and use bool for whitelist_modification_pending --- src/hci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hci.c b/src/hci.c index 060d627a1..167efb501 100644 --- a/src/hci.c +++ b/src/hci.c @@ -3692,20 +3692,20 @@ static bool hci_run_general_gap_le(void){ // check if whitelist needs modification btstack_linked_list_iterator_t lit; - int modification_pending = 0; + bool whitelist_modification_pending = false; btstack_linked_list_iterator_init(&lit, &hci_stack->le_whitelist); while (btstack_linked_list_iterator_has_next(&lit)){ whitelist_entry_t * entry = (whitelist_entry_t*) btstack_linked_list_iterator_next(&lit); if (entry->state & (LE_WHITELIST_REMOVE_FROM_CONTROLLER | LE_WHITELIST_ADD_TO_CONTROLLER)){ - modification_pending = 1; + whitelist_modification_pending = true; break; } } - if (modification_pending){ + if (whitelist_modification_pending){ #ifdef ENABLE_LE_CENTRAL - // stop connnecting if modification pending + // stop connecting if modification pending if (hci_stack->le_connecting_state != LE_CONNECTING_IDLE){ hci_send_cmd(&hci_le_create_connection_cancel); return true;