Bluetooth: Fix inverted assert conditions in buf.c
Change-Id: Idd858ba3a3bf779e6b8084b61459ee5c9347094b Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
710aa2ecc7
commit
3303864d3b
|
@ -154,7 +154,7 @@ void *bt_buf_add(struct bt_buf *buf, size_t len)
|
|||
|
||||
BT_DBG("buf %p len %u\n", buf, len);
|
||||
|
||||
BT_ASSERT(bt_buf_tailroom(buf) < len);
|
||||
BT_ASSERT(bt_buf_tailroom(buf) >= len);
|
||||
|
||||
buf->len += len;
|
||||
return tail;
|
||||
|
@ -164,7 +164,7 @@ void *bt_buf_push(struct bt_buf *buf, size_t len)
|
|||
{
|
||||
BT_DBG("buf %p len %u\n", buf, len);
|
||||
|
||||
BT_ASSERT(bt_buf_headroom(buf) < len);
|
||||
BT_ASSERT(bt_buf_headroom(buf) >= len);
|
||||
|
||||
buf->data -= len;
|
||||
buf->len += len;
|
||||
|
@ -175,7 +175,7 @@ void *bt_buf_pull(struct bt_buf *buf, size_t len)
|
|||
{
|
||||
BT_DBG("buf %p len %u\n", buf, len);
|
||||
|
||||
BT_ASSERT(buf->len < len);
|
||||
BT_ASSERT(buf->len >= len);
|
||||
|
||||
buf->len -= len;
|
||||
return buf->data += len;
|
||||
|
|
Loading…
Reference in New Issue