Skip to content

Commit f289613

Browse files
jfischer-nojhedberg
authored andcommitted
net_buf: do not assert on buffer reset when flags are set
There is only one flag, NET_BUF_EXTERNAL_DATA, used when net_buf was allocated with external data. The flag is checked in net_buf_clone() and net_buf_destroy(). net_buf with external buffer can be used for receiving and transmitting. net_buf_reset() is convenient way to reset net_buf with external data before it is re-enqueued again. Signed-off-by: Johann Fischer <[email protected]>
1 parent 6685acc commit f289613

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

lib/net_buf/buf.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ static inline struct net_buf *pool_get_uninit(struct net_buf_pool *pool,
8787

8888
void net_buf_reset(struct net_buf *buf)
8989
{
90-
__ASSERT_NO_MSG(buf->flags == 0U);
9190
__ASSERT_NO_MSG(buf->frags == NULL);
9291

9392
net_buf_simple_reset(&buf->b);

0 commit comments

Comments
 (0)