Skip to content

Commit

Permalink
tests: Bluetooth: Tester: Reorder btp_buf to fix variable array
Browse files Browse the repository at this point in the history
The `btp_hdr` needs to be last in the struct, as it has
a variable length array (data[]).

Signed-off-by: Emil Gydesen <[email protected]>
  • Loading branch information
Thalley authored and kartben committed Jan 21, 2025
1 parent c562cbc commit 176676d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/bluetooth/tester/src/btp.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ static struct k_thread cmd_thread;
#define CMD_QUEUED 2
struct btp_buf {
intptr_t _reserved;
uint8_t rsp[BTP_MTU];
union {
uint8_t data[BTP_MTU];
struct btp_hdr hdr;
};
uint8_t rsp[BTP_MTU];
};

static struct btp_buf cmd_buf[CMD_QUEUED];
Expand Down

0 comments on commit 176676d

Please sign in to comment.