subsys/shell/backends: Fix shell_telnet.c build with clang
It declares a variable inside a switch statement without brackets to properly delimit the scope, making clang barf. This patch adds them. Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
This commit is contained in:
parent
6c25136e60
commit
049b67aca9
1 changed files with 4 additions and 0 deletions
|
@ -99,6 +99,7 @@ static void telnet_reply_dont_command(struct telnet_simple_command *cmd)
|
|||
{
|
||||
switch (cmd->opt) {
|
||||
case NVT_OPT_ECHO:
|
||||
{
|
||||
int ret = telnet_echo_set(sh_telnet->shell_context, false);
|
||||
|
||||
if (ret >= 0) {
|
||||
|
@ -107,6 +108,7 @@ static void telnet_reply_dont_command(struct telnet_simple_command *cmd)
|
|||
cmd->op = NVT_CMD_WILL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
cmd->op = NVT_CMD_WONT;
|
||||
break;
|
||||
|
@ -123,6 +125,7 @@ static void telnet_reply_do_command(struct telnet_simple_command *cmd)
|
|||
cmd->op = NVT_CMD_WILL;
|
||||
break;
|
||||
case NVT_OPT_ECHO:
|
||||
{
|
||||
int ret = telnet_echo_set(sh_telnet->shell_context, true);
|
||||
|
||||
if (ret >= 0) {
|
||||
|
@ -131,6 +134,7 @@ static void telnet_reply_do_command(struct telnet_simple_command *cmd)
|
|||
cmd->op = NVT_CMD_WONT;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
cmd->op = NVT_CMD_WONT;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue