Skip to content

Commit b79ef27

Browse files
sjanccfriedt
authored andcommitted
tests: Bluetooth: Tester: Fix accessing out of scope variables in VCP
Input and output descriptors are writable storage for VCP parameters and shall be valid for use duration. This fix usage of variables being used outside of their declaration scope. Signed-off-by: Szymon Janc <[email protected]>
1 parent c57c009 commit b79ef27

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/bluetooth/tester/src/audio/btp_vcp.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -465,10 +465,10 @@ struct bt_aics_cb aics_server_cb = {
465465
/* General profile handling */
466466
static void set_register_params(uint8_t gain_mode)
467467
{
468-
char input_desc[CONFIG_BT_VCP_VOL_REND_AICS_INSTANCE_COUNT]
469-
[BT_AICS_MAX_INPUT_DESCRIPTION_SIZE];
470-
char output_desc[CONFIG_BT_VCP_VOL_REND_VOCS_INSTANCE_COUNT]
471-
[BT_AICS_MAX_OUTPUT_DESCRIPTION_SIZE];
468+
static char input_desc[CONFIG_BT_VCP_VOL_REND_AICS_INSTANCE_COUNT]
469+
[BT_AICS_MAX_INPUT_DESCRIPTION_SIZE];
470+
static char output_desc[CONFIG_BT_VCP_VOL_REND_VOCS_INSTANCE_COUNT]
471+
[BT_AICS_MAX_OUTPUT_DESCRIPTION_SIZE];
472472

473473
memset(&vcp_register_param, 0, sizeof(vcp_register_param));
474474

0 commit comments

Comments
 (0)