Bluetooth: ATT: Fix redundant sys_slist call
Uses sys_slist_get function to get node and automatically, if valid, remove one from the list. Change-Id: I4cee6fbb064bf9644efdb7e6771e702b1f08678a Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
This commit is contained in:
parent
53fde44046
commit
4880e717b1
1 changed files with 2 additions and 3 deletions
|
@ -209,13 +209,12 @@ static void att_process(struct bt_att *att)
|
|||
|
||||
BT_DBG("");
|
||||
|
||||
/* Peek next request from the list */
|
||||
node = sys_slist_peek_head(&att->reqs);
|
||||
/* Pull next request from the list */
|
||||
node = sys_slist_get(&att->reqs);
|
||||
if (!node) {
|
||||
return;
|
||||
}
|
||||
|
||||
sys_slist_remove(&att->reqs, NULL, node);
|
||||
att_send_req(att, ATT_REQ(node));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue