1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-23 01:49:53 +03:00

src/Cedar/Command.c: remove logically dead code

found by coverity
This commit is contained in:
Ilya Shipitsin 2018-08-12 16:03:10 +05:00
parent d3fc90f4e0
commit ad41d54b29

View File

@ -19678,30 +19678,17 @@ UINT PsDhcpDisable(CONSOLE *c, char *cmd_name, wchar_t *str, void *param)
} }
else else
{ {
bool ok = true;
t.UseDhcp = false; t.UseDhcp = false;
if (ok == false) ret = ScSetSecureNATOption(ps->Rpc, &t);
if (ret != ERR_NO_ERROR)
{ {
// Parameter is invalid // An error has occured
ret = ERR_INVALID_PARAMETER;
CmdPrintError(c, ret); CmdPrintError(c, ret);
FreeParamValueList(o); FreeParamValueList(o);
return ret; return ret;
} }
else
{
ret = ScSetSecureNATOption(ps->Rpc, &t);
if (ret != ERR_NO_ERROR)
{
// An error has occured
CmdPrintError(c, ret);
FreeParamValueList(o);
return ret;
}
}
} }
FreeParamValueList(o); FreeParamValueList(o);