Bluetooth: fix C++ compile error

C++ disallows implicit cast to enum values.

Signed-off-by: Rihards Skuja <rihardssk@mikrotik.com>
This commit is contained in:
Rihards Skuja 2020-12-11 12:58:35 +02:00 committed by Anas Nashif
commit 3b89f4a474

View file

@ -130,7 +130,8 @@ static inline void bt_buf_set_type(struct net_buf *buf, enum bt_buf_type type)
*/ */
static inline enum bt_buf_type bt_buf_get_type(struct net_buf *buf) static inline enum bt_buf_type bt_buf_get_type(struct net_buf *buf)
{ {
return ((struct bt_buf_data *)net_buf_user_data(buf))->type; return (enum bt_buf_type)((struct bt_buf_data *)net_buf_user_data(buf))
->type;
} }
/** /**