Bluetooth: Change bt_buf_add return type to 'void *'

Almost all callers of bt_buf_add end up having to do explicit type
casts of the return value since 'uint8_t *' rarely fits what's needed.
Changing the return type to 'void *' removes this extra type casting
need and makes the API friendlier to its users.

Change-Id: I6a79605006153b6d09f0d662a051cb599af68c37
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2015-05-18 10:14:22 +03:00 committed by Anas Nashif
commit d6a03600b2
2 changed files with 4 additions and 4 deletions

View file

@ -98,7 +98,7 @@ void bt_buf_put(struct bt_buf *buf);
struct bt_buf *bt_buf_hold(struct bt_buf *buf);
/* Prepare data to be added at the end of the buffer */
uint8_t *bt_buf_add(struct bt_buf *buf, size_t len);
void *bt_buf_add(struct bt_buf *buf, size_t len);
/* Push data to the beginning of the buffer */
uint8_t *bt_buf_push(struct bt_buf *buf, size_t len);