Skip to content

Commit 9823852

Browse files
Johan Hedbergjhedberg
authored andcommitted
net: buf: Make net_buf_user_data() parameter const
This API doesn't modify the input buffer in anyway, so declare it as const. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
1 parent 387e91a commit 9823852

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/net/buf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ struct net_buf *net_buf_clone(struct net_buf *buf, s32_t timeout);
971971
*
972972
* @return Pointer to the user data of the buffer.
973973
*/
974-
static inline void *net_buf_user_data(struct net_buf *buf)
974+
static inline void *net_buf_user_data(const struct net_buf *buf)
975975
{
976976
return (void *)buf->user_data;
977977
}

0 commit comments

Comments
 (0)