summaryrefslogtreecommitdiff
path: root/redfish-core/lib/health.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'redfish-core/lib/health.hpp')
-rw-r--r--redfish-core/lib/health.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/redfish-core/lib/health.hpp b/redfish-core/lib/health.hpp
index 2f0f156ae0..7955fc0d4b 100644
--- a/redfish-core/lib/health.hpp
+++ b/redfish-core/lib/health.hpp
@@ -67,7 +67,6 @@ struct HealthPopulate : std::enable_shared_from_this<HealthPopulate>
for (const auto& [path, interfaces] : statuses)
{
- bool isChild = false;
bool isSelf = false;
if (selfPath)
{
@@ -86,6 +85,7 @@ struct HealthPopulate : std::enable_shared_from_this<HealthPopulate>
// of this association is an inventory item, or one of the
// endpoints in this association is a child
+ bool isChild = false;
for (const std::string& child : inventory)
{
if (path.str.starts_with(child))