Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/zephyr/net_buf.h
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ size_t net_buf_simple_tailroom(const struct net_buf_simple *buf);
*
* @return Number of bytes usable behind the net_buf_simple::data pointer.
*/
uint16_t net_buf_simple_max_len(const struct net_buf_simple *buf);
size_t net_buf_simple_max_len(const struct net_buf_simple *buf);

/**
* @brief Parsing state of a buffer.
Expand Down Expand Up @@ -2557,7 +2557,7 @@ static inline size_t net_buf_headroom(const struct net_buf *buf)
*
* @return Number of bytes usable behind the net_buf::data pointer.
*/
static inline uint16_t net_buf_max_len(const struct net_buf *buf)
static inline size_t net_buf_max_len(const struct net_buf *buf)
{
return net_buf_simple_max_len(&buf->b);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/net_buf/buf_simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ size_t net_buf_simple_tailroom(const struct net_buf_simple *buf)
return buf->size - net_buf_simple_headroom(buf) - buf->len;
}

uint16_t net_buf_simple_max_len(const struct net_buf_simple *buf)
size_t net_buf_simple_max_len(const struct net_buf_simple *buf)
{
return buf->size - net_buf_simple_headroom(buf);
}
2 changes: 1 addition & 1 deletion subsys/net/ip/net_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ static inline void net_pkt_print_buffer_info(struct net_pkt *pkt, const char *st
}

while (buf) {
printk("%p[%ld/%u (%u/%u)]", buf, atomic_get(&pkt->atomic_ref),
printk("%p[%ld/%u (%zu/%u)]", buf, atomic_get(&pkt->atomic_ref),
buf->len, net_buf_max_len(buf), buf->size);

buf = buf->frags;
Expand Down
2 changes: 1 addition & 1 deletion subsys/net/lib/shell/pkt.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ static void net_pkt_buffer_info(const struct shell *sh, struct net_pkt *pkt)
}

while (buf) {
PR("%p[%ld/%u (%u/%u)]", buf, atomic_get(&pkt->atomic_ref),
PR("%p[%ld/%u (%zu/%u)]", buf, atomic_get(&pkt->atomic_ref),
buf->len, net_buf_max_len(buf), buf->size);

buf = buf->frags;
Expand Down