diff --git a/src/Cedar/Command.c b/src/Cedar/Command.c index 7f380b33..2fbbddd5 100644 --- a/src/Cedar/Command.c +++ b/src/Cedar/Command.c @@ -19678,30 +19678,17 @@ UINT PsDhcpDisable(CONSOLE *c, char *cmd_name, wchar_t *str, void *param) } else { - bool ok = true; - t.UseDhcp = false; - if (ok == false) + ret = ScSetSecureNATOption(ps->Rpc, &t); + + if (ret != ERR_NO_ERROR) { - // Parameter is invalid - ret = ERR_INVALID_PARAMETER; + // An error has occured CmdPrintError(c, ret); FreeParamValueList(o); 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);