Skip to content

Commit

Permalink
net: buf: Use void * instead of u8_t * for arbitrary data
Browse files Browse the repository at this point in the history
This makes the net_buf_append_bytes() API consistent with all other
net_buf APIs that take a pointer to arbitrary data.

Fixes #9283

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
  • Loading branch information
Johan Hedberg authored and jhedberg committed Sep 11, 2018
1 parent 990a0e8 commit c90549c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/net/buf.h
Original file line number Diff line number Diff line change
Expand Up @@ -1353,7 +1353,7 @@ typedef struct net_buf *(*net_buf_allocator_cb)(s32_t timeout, void *user_data);
* were no free fragments in a pool to accommodate all data.
*/
u16_t net_buf_append_bytes(struct net_buf *buf, u16_t len,
const u8_t *value, s32_t timeout,
const void *value, s32_t timeout,
net_buf_allocator_cb allocate_cb, void *user_data);

/**
Expand Down
2 changes: 1 addition & 1 deletion subsys/net/buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ int net_buf_linearize(void *dst, size_t dst_len, struct net_buf *src,
* the buffer. It assumes that the buffer has at least one fragment.
*/
u16_t net_buf_append_bytes(struct net_buf *buf, u16_t len,
const u8_t *value, s32_t timeout,
const void *value, s32_t timeout,
net_buf_allocator_cb allocate_cb, void *user_data)
{
struct net_buf *frag = net_buf_frag_last(buf);
Expand Down

0 comments on commit c90549c

Please sign in to comment.