Optimize the response value of ipmiSetUserPassword method
ipmiCCPasswdFailMismatch has been declared in usercommands.hpp, so
there is no need to declare a static variable.
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: I1989c4674392544aaf736823c8b5f9b2ac7acefa
diff --git a/user_channel/usercommands.cpp b/user_channel/usercommands.cpp
index cc7174f..4a3e24a 100644
--- a/user_channel/usercommands.cpp
+++ b/user_channel/usercommands.cpp
@@ -353,7 +353,6 @@
{
lg2::debug("Test password failed, user Id: {USER_ID}", "USER_ID",
userId);
- static constexpr ipmi::Cc ipmiCCPasswdFailMismatch = 0x80;
return ipmi::response(ipmiCCPasswdFailMismatch);
}
return ipmi::responseSuccess();
diff --git a/user_channel/usercommands.hpp b/user_channel/usercommands.hpp
index ea04a26..9f9ba26 100644
--- a/user_channel/usercommands.hpp
+++ b/user_channel/usercommands.hpp
@@ -35,7 +35,7 @@
/**
* @enum IPMI set password return codes (refer spec sec 22.30)
*/
-enum class IPMISetPasswordReturnCodes
+enum ipmi_set_password_return_codes : uint8_t
{
ipmiCCPasswdFailMismatch = 0x80,
ipmiCCPasswdFailWrongSize = 0x81,