host-transport: pldm: fix variable shadow
Inside a single function are two variables both named 'eid' but
of different types. This causes confusion to clang and implicit
constructors are inadvertently called. Eliminate the variable shadow.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I2c15799718b0129aad01ab857dec7a255cbf36a3
diff --git a/host-transport-extensions/pldm/oem/ibm/pldm_oem_cmds.cpp b/host-transport-extensions/pldm/oem/ibm/pldm_oem_cmds.cpp
index b51aeaf..0836c44 100644
--- a/host-transport-extensions/pldm/oem/ibm/pldm_oem_cmds.cpp
+++ b/host-transport-extensions/pldm/oem/ibm/pldm_oem_cmds.cpp
@@ -79,11 +79,11 @@
}
else
{
- std::string eid;
- eidFile >> eid;
- if (!eid.empty())
+ std::string eidStr;
+ eidFile >> eidStr;
+ if (!eidStr.empty())
{
- eid = strtol(eid.c_str(), nullptr, 10);
+ eid = strtol(eidStr.c_str(), nullptr, 10);
}
else
{