From 9c323d685bfb0e16b0ac7de32bc23cf21ed86ecf Mon Sep 17 00:00:00 2001 From: Benjamin Lucke Date: Mon, 30 Oct 2023 14:23:46 +0100 Subject: [PATCH] Bluetooth: BAP: Shell: Fixed some bap shell cmds Added missing initialization for cmd_stream_qos and cmd_sync_broadcast. Signed-off-by: Benjamin Lucke --- subsys/bluetooth/audio/shell/bap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subsys/bluetooth/audio/shell/bap.c b/subsys/bluetooth/audio/shell/bap.c index b83237f9798..bbddb0d3ee6 100644 --- a/subsys/bluetooth/audio/shell/bap.c +++ b/subsys/bluetooth/audio/shell/bap.c @@ -1163,7 +1163,7 @@ static int cmd_stream_qos(const struct shell *sh, size_t argc, char *argv[]) { struct bt_audio_codec_qos *qos; unsigned long interval; - int err; + int err = 0; if (default_stream == NULL) { shell_print(sh, "No stream selected"); @@ -2282,7 +2282,7 @@ static int cmd_sync_broadcast(const struct shell *sh, size_t argc, char *argv[]) struct bt_bap_stream *streams[ARRAY_SIZE(broadcast_sink_streams)]; uint32_t bis_bitfield; size_t stream_cnt; - int err; + int err = 0; bis_bitfield = 0; stream_cnt = 0U;