mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-26 12:35:25 +00:00
MISRAC2012-Rule-20.7: don't use comma operator
This commit is contained in:
parent
5efd501109
commit
15a2796783
@ -1607,9 +1607,9 @@ void hfp_log_rfcomm_message(const char * tag, uint8_t * packet, uint16_t size){
|
||||
#ifdef ENABLE_LOG_INFO
|
||||
// encode \n\r
|
||||
char printable[HFP_HF_RX_DEBUG_PRINT_LINE+2];
|
||||
int i;
|
||||
int i = 0;
|
||||
int pos;
|
||||
for (i=0,pos=0;(pos < size) && (i < (HFP_HF_RX_DEBUG_PRINT_LINE - 3)); pos++){
|
||||
for (pos=0 ; (pos < size) && (i < (HFP_HF_RX_DEBUG_PRINT_LINE - 3)) ; pos++){
|
||||
switch (packet[pos]){
|
||||
case '\n':
|
||||
printable[i++] = '\\';
|
||||
|
@ -439,7 +439,9 @@ static int hci_is_le_connection(hci_connection_t * connection){
|
||||
static int nr_hci_connections(void){
|
||||
int count = 0;
|
||||
btstack_linked_item_t *it;
|
||||
for (it = (btstack_linked_item_t *) hci_stack->connections; it ; it = it->next, count++);
|
||||
for (it = (btstack_linked_item_t *) hci_stack->connections; it ; it = it->next){
|
||||
count++;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user