bluetooth: fix missing braces and indentation

This commit is contained in:
Anton Maklakov 2018-08-29 12:54:29 +08:00 committed by Ivan Grokhotkov
parent ed546797d0
commit e8eb8cb2a4
2 changed files with 8 additions and 7 deletions

View File

@ -578,13 +578,14 @@ void bta_gattc_clear_notif_registration(tBTA_GATTC_SERV *p_srcb, UINT16 conn_id,
for (i = 0 ; i < BTA_GATTC_NOTIF_REG_MAX; i ++) {
if (p_clrcb->notif_reg[i].in_use &&
!bdcmp(p_clrcb->notif_reg[i].remote_bda, remote_bda))
{
/* It's enough to get service or characteristic handle, as
* clear boundaries are always around service.
*/
handle = p_clrcb->notif_reg[i].handle;
if (handle >= start_handle && handle <= end_handle)
memset(&p_clrcb->notif_reg[i], 0, sizeof(tBTA_GATTC_NOTIF_REG));
}
}
}
} else {

View File

@ -99,13 +99,13 @@ list_node_t *list_back_node(const list_t *list) {
}
bool list_insert_after(list_t *list, list_node_t *prev_node, void *data) {
assert(list != NULL);
assert(prev_node != NULL);
assert(data != NULL);
assert(list != NULL);
assert(prev_node != NULL);
assert(data != NULL);
list_node_t *node = (list_node_t *)list->allocator->alloc(sizeof(list_node_t));
if (!node)
return false;
list_node_t *node = (list_node_t *)list->allocator->alloc(sizeof(list_node_t));
if (!node)
return false;
node->next = prev_node->next;
node->data = data;