diff options
author | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2019-11-27 17:35:22 +0100 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2020-03-05 19:22:22 +0100 |
commit | 89f38f730d5fede094d4be98bea7235a4281aaf3 (patch) | |
tree | b0a24c30abf1f2fb55a0e928ec2df2221a1a22c6 | |
parent | c82e3b0c94d17ac10a5aeb192a011447b74bf727 (diff) |
tdx-cfg-block: fix while checking for uninitialised len
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r-- | board/toradex/common/tdx-cfg-block.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/board/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c index 4e3c6e6b06..4bf2564988 100644 --- a/board/toradex/common/tdx-cfg-block.c +++ b/board/toradex/common/tdx-cfg-block.c @@ -482,10 +482,10 @@ static int get_cfgblock_interactive(void) return -1; } - while (len < 4) { + do { sprintf(message, "Enter the module version (e.g. V1.1B): V"); len = cli_readline(message); - } + } while (len < 4); tdx_hw_tag.ver_major = console_buffer[0] - '0'; tdx_hw_tag.ver_minor = console_buffer[2] - '0'; |