From 915f0fd74c6065b39ab84b2ecafce57000c822a7 Mon Sep 17 00:00:00 2001 From: Hang Fan Date: Sat, 23 Dec 2023 21:19:16 +0800 Subject: [PATCH] Bluetooth: Shell: Fix coverity issue in cmd_adv_data Fix wrong parameter type to avoid Unsigned compared against 0 Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/65578 Signed-off-by: Hang Fan --- subsys/bluetooth/shell/bt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/bluetooth/shell/bt.c b/subsys/bluetooth/shell/bt.c index ca3c7c3c0ea..e65e85262a7 100644 --- a/subsys/bluetooth/shell/bt.c +++ b/subsys/bluetooth/shell/bt.c @@ -2001,7 +2001,7 @@ static int cmd_adv_data(const struct shell *sh, size_t argc, char *argv[]) size_t hex_data_len; size_t ad_len = 0; size_t sd_len = 0; - size_t len = 0; + ssize_t len = 0; bool discoverable = false; size_t *data_len; int err;