Prime FRUs if only required
Add missed isPrimingRequired check from the previous commit and
optimize the return statement in the same API.
Change-Id: I6cf8228a98ef4dbfc6838ae7420fda5eebb5be16
Signed-off-by: Anupama B R <anupama.b.r1@ibm.com>
diff --git a/wait-vpd-parser/src/prime_inventory.cpp b/wait-vpd-parser/src/prime_inventory.cpp
index b09b635..2dab4bb 100644
--- a/wait-vpd-parser/src/prime_inventory.cpp
+++ b/wait-vpd-parser/src/prime_inventory.cpp
@@ -75,7 +75,7 @@
l_invPathCount += 1;
}
}
- return ((l_objectPaths.size() >= l_invPathCount) ? false : true);
+ return (l_objectPaths.size() < l_invPathCount);
}
catch (const std::exception& l_ex)
{
@@ -93,7 +93,7 @@
{
try
{
- if (m_sysCfgJsonObj.empty())
+ if (m_sysCfgJsonObj.empty() || !isPrimingRequired())
{
return;
}