summaryrefslogtreecommitdiffstats
path: root/user_channel/user_mgmt.cpp
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2019-08-19 11:12:05 -0700
committerPatrick Venture <venture@google.com>2019-08-20 08:55:01 -0700
commit3a697ade9519b2ac5ad61fe218f38f5136263185 (patch)
tree15fde0c3083aa48b4a40afd72930a1a4d53e44bf /user_channel/user_mgmt.cpp
parent67ed85c9fbc9fc9d2eca374c532ff14877b01390 (diff)
downloadphosphor-host-ipmid-3a697ade9519b2ac5ad61fe218f38f5136263185.tar.gz
phosphor-host-ipmid-3a697ade9519b2ac5ad61fe218f38f5136263185.zip
user_channel: user_mgmt: minor cleanup from cppcheck
[user_channel/user_mgmt.cpp:1628]: (style) The scope of the variable 'usrEnabled' can be reduced. [user_channel/user_mgmt.cpp:310]: (style) Unused variable: update Tested: Not tested. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Id38469ab5d5b0fa9c512f5a77fff1f1372e794c2
Diffstat (limited to 'user_channel/user_mgmt.cpp')
-rw-r--r--user_channel/user_mgmt.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/user_channel/user_mgmt.cpp b/user_channel/user_mgmt.cpp
index 000e9b1..bf43f88 100644
--- a/user_channel/user_mgmt.cpp
+++ b/user_channel/user_mgmt.cpp
@@ -307,7 +307,7 @@ void userUpdatedSignalHandler(UserAccess& usrAccess,
{
static sdbusplus::bus::bus bus(ipmid_get_sd_bus_connection());
std::string signal = msg.get_member();
- std::string userName, update, priv, newUserName;
+ std::string userName, priv, newUserName;
std::vector<std::string> groups;
bool enabled = false;
UserUpdateEvent userEvent = UserUpdateEvent::reservedEvent;
@@ -1625,7 +1625,6 @@ void UserAccess::initUserDataFile()
{
std::vector<std::string> usrGrps;
std::string usrPriv;
- bool usrEnabled;
std::string userName(
reinterpret_cast<char*>(userData->user[usrIdx].userName), 0,
@@ -1636,6 +1635,8 @@ void UserAccess::initUserDataFile()
auto usrObj = managedObjs.find(usersPath);
if (usrObj != managedObjs.end())
{
+ bool usrEnabled;
+
// User exist. Lets check and update other fileds
getUserObjProperties(usrObj->second, usrGrps, usrPriv,
usrEnabled);
OpenPOWER on IntegriCloud