Skip to content

Commit 1441a5a

Browse files
ceolinjhedberg
authored andcommitted
bt: controller/openisa: 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 e50da84 commit 1441a5a

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

subsys/bluetooth/controller/ll_sw/openisa/lll/pdu_vendor.h

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,27 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7+
#include <zephyr/sys/util.h>
8+
79
/* Minimum vendor specific Rx payload buffer allocation */
810
#define LL_VND_OCTETS_RX_MIN 0
911

1012
/* No vendor Data PDU struct octet3 */
1113
struct pdu_data_vnd_octet3 {
12-
union {
13-
uint8_t resv[0];
14-
} __packed;
14+
FLEXIBLE_ARRAY_DECLARE(uint8_t, resv);
1515
} __packed;
1616

1717
/* No vendor BIS PDU struct octet3 */
1818
struct pdu_bis_vnd_octet3 {
19-
union {
20-
uint8_t resv[0];
21-
} __packed;
19+
FLEXIBLE_ARRAY_DECLARE(uint8_t, resv);
2220
} __packed;
2321

2422
/* No vendor CIS PDU struct octet3 */
2523
struct pdu_cis_vnd_octet3 {
26-
union {
27-
uint8_t resv[0];
28-
} __packed;
24+
FLEXIBLE_ARRAY_DECLARE(uint8_t, resv);
2925
} __packed;
3026

3127
/* No ISOAL helper vendor ISO PDU struct octet3 */
3228
struct pdu_iso_vnd_octet3 {
33-
union {
34-
uint8_t resv[0];
35-
} __packed;
29+
FLEXIBLE_ARRAY_DECLARE(uint8_t, resv);
3630
} __packed;

0 commit comments

Comments
 (0)