From 60e8d9d8591f6d84b13501a8ff51d7a0c5f1dbbb Mon Sep 17 00:00:00 2001 From: Andrei Emeltchenko Date: Thu, 31 Aug 2023 22:28:25 +0300 Subject: [PATCH] tests: btp_bap: Fix using wrong index Fix using cig_id instead of index i Signed-off-by: Andrei Emeltchenko --- tests/bluetooth/tester/src/btp_bap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/bluetooth/tester/src/btp_bap.c b/tests/bluetooth/tester/src/btp_bap.c index d7cb9de79b1f25..096950df83fc09 100644 --- a/tests/bluetooth/tester/src/btp_bap.c +++ b/tests/bluetooth/tester/src/btp_bap.c @@ -1218,7 +1218,7 @@ static int client_create_unicast_group(struct audio_connection *audio_conn, uint * in the right order. */ for (uint8_t i = 0; i < cig_id; i++) { - if (cigs[cig_id] == NULL) { + if (cigs[i] == NULL) { return -EINVAL; } }