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:
Arkadiusz Lichwa 2016-11-02 15:07:54 +01:00 committed by Johan Hedberg
commit 4880e717b1

View file

@ -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));
}