Commit 09546ff3 authored by Lars Knudsen's avatar Lars Knudsen Committed by Mahesh Mahadevan
Browse files

Bluetooth: Shell: Set err to 0 before shell_strtoul



The value of err was not initialized to 0 prior
to calling shell_strtoul, which only sets err
on actual error.

Signed-off-by: default avatarLars Knudsen <LAKD@demant.com>
parent cd3dcf78
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -806,6 +806,7 @@ static int cmd_big_sync(const struct shell *sh, size_t argc, char *argv[])
		return -ENOEXEC;
	}

	err = 0;
	bis_bitfield = shell_strtoul(argv[1], 0, &err);
	if (err != 0) {
		shell_error(sh, "Could not parse bis_bitfield: %d", err);