From 176676d81fdc44a62fe6f5ffe857d0f521ee1f24 Mon Sep 17 00:00:00 2001 From: Emil Gydesen Date: Mon, 20 Jan 2025 20:46:36 +0100 Subject: [PATCH] tests: Bluetooth: Tester: Reorder btp_buf to fix variable array The `btp_hdr` needs to be last in the struct, as it has a variable length array (data[]). Signed-off-by: Emil Gydesen --- tests/bluetooth/tester/src/btp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/bluetooth/tester/src/btp.c b/tests/bluetooth/tester/src/btp.c index 6bc7a4d5e3af..ca95e18a4750 100644 --- a/tests/bluetooth/tester/src/btp.c +++ b/tests/bluetooth/tester/src/btp.c @@ -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];