diff options
author | Chen,Yugang <yugang.chen@linux.intel.com> | 2019-09-06 11:03:05 +0800 |
---|---|---|
committer | Vernon Mauery <vernon.mauery@linux.intel.com> | 2019-09-23 17:50:41 +0000 |
commit | 0e862fabcc4772ec8f98c60ed3ddd004f785b6ce (patch) | |
tree | bd229ed2d500fe50f75492030158934c8907d9aa /user_channel/user_mgmt.cpp | |
parent | 98b43babb75177101499de4e8f55bbb19bea40ad (diff) | |
download | phosphor-host-ipmid-0e862fabcc4772ec8f98c60ed3ddd004f785b6ce.tar.gz phosphor-host-ipmid-0e862fabcc4772ec8f98c60ed3ddd004f785b6ce.zip |
Static code analysis scan issue fix
Fix the issues found during code static scan
Tested:
test in board, function works fine.
1. busctl set-property for watchdog, it works fine.
2. It works by running "ipmitool chassis power soft".
3. run "ipmitool raw 0x6 0x46 1", get expected user information.
Change-Id: I7a2cc3c934db6a7531f8a8ea05956cb6d6337633
Signed-off-by: Chen,Yugang <yugang.chen@linux.intel.com>
Diffstat (limited to 'user_channel/user_mgmt.cpp')
-rw-r--r-- | user_channel/user_mgmt.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/user_channel/user_mgmt.cpp b/user_channel/user_mgmt.cpp index bf43f88..d0dcb38 100644 --- a/user_channel/user_mgmt.cpp +++ b/user_channel/user_mgmt.cpp @@ -1635,7 +1635,7 @@ void UserAccess::initUserDataFile() auto usrObj = managedObjs.find(usersPath); if (usrObj != managedObjs.end()) { - bool usrEnabled; + bool usrEnabled = false; // User exist. Lets check and update other fileds getUserObjProperties(usrObj->second, usrGrps, usrPriv, @@ -1692,7 +1692,7 @@ void UserAccess::initUserDataFile() { std::vector<std::string> usrGrps; std::string usrPriv, userName; - bool usrEnabled; + bool usrEnabled = false; std::string usrObjPath = std::string(usrObj.first); if (getUserNameFromPath(usrObj.first.str, userName) != 0) { |