summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2018-10-30 13:13:06 -0700
committerPatrick Venture <venture@google.com>2018-10-30 13:13:06 -0700
commitcaa73ad5cd0ecae2fb0789c52e5553aef98fdd21 (patch)
tree7f567a2bd7321cbcdf603564ed8acdaba21eb4f8
parentf18bf836d206b1bc5b4fd849127a2e706eddf0aa (diff)
downloadphosphor-logging-caa73ad5cd0ecae2fb0789c52e5553aef98fdd21.tar.gz
phosphor-logging-caa73ad5cd0ecae2fb0789c52e5553aef98fdd21.zip
style: scope reduction
[elog_meta.hpp:77]: (style) The scope of the variable 'ROOT' can be reduced. Change-Id: I2511c3b1551db08e5f0eef2d71513de36eb79f80 Signed-off-by: Patrick Venture <venture@google.com>
-rw-r--r--elog_meta.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/elog_meta.hpp b/elog_meta.hpp
index 0fe05f2..6e44406 100644
--- a/elog_meta.hpp
+++ b/elog_meta.hpp
@@ -74,7 +74,6 @@ inline void
const std::vector<std::string>& data,
AssociationList& list)
{
- constexpr auto ROOT = "/xyz/openbmc_project/inventory";
std::map<std::string, std::string> metadata;
parse(data, metadata);
auto iter = metadata.find(match);
@@ -88,6 +87,8 @@ inline void
if ((callouts.end() != callout) &&
!strcmp((iter->second).c_str(), std::get<0>(*callout)))
{
+ constexpr auto ROOT = "/xyz/openbmc_project/inventory";
+
list.push_back(std::make_tuple(
"callout", "fault", std::string(ROOT) + std::get<1>(*callout)));
}
OpenPOWER on IntegriCloud