Skip to content

Commit e50da84

Browse files
ceolinjhedberg
authored andcommitted
bt: host/classic: Use proper flexible array
0 length array is a GNU extension. Use proper C99 flexible array. Signed-off-by: Flavio Ceolin <[email protected]>
1 parent bfa44f5 commit e50da84

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

subsys/bluetooth/host/classic/l2cap_br_internal.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#include <zephyr/bluetooth/l2cap.h>
1212
#include <zephyr/sys/iterable_sections.h>
13+
#include <zephyr/sys/util.h>
1314
#include "l2cap_br_interface.h"
1415

1516
#define BT_L2CAP_CID_BR_SIG 0x0001
@@ -177,12 +178,12 @@ struct bt_l2cap_disconn_rsp {
177178

178179
#define BT_L2CAP_ECHO_REQ 0x08
179180
struct bt_l2cap_echo_req {
180-
uint8_t data[0];
181+
FLEXIBLE_ARRAY_DECLARE(uint8_t, data);
181182
} __packed;
182183

183184
#define BT_L2CAP_ECHO_RSP 0x09
184185
struct bt_l2cap_echo_rsp {
185-
uint8_t data[0];
186+
FLEXIBLE_ARRAY_DECLARE(uint8_t, data);
186187
} __packed;
187188

188189
#define BT_L2CAP_INFO_CONNLESS_MTU 0x0001

0 commit comments

Comments
 (0)