From 007a2cb0191757290f959aaaa20842db860b3fe6 Mon Sep 17 00:00:00 2001 From: Vikram Bodireddy Date: Fri, 6 Dec 2019 15:48:00 +0530 Subject: PFR Manager minor fix for conditional statetment PFR Manager minor fix for a line that uses lengthy conditinal check, instead we use if-else conditional. Change-Id: I03b2b08e6acb86d933aa952a81f51006cddd2355 Signed-off-by: Vikram Bodireddy --- intel-pfr-manager/service/src/pfr_mgr.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/intel-pfr-manager/service/src/pfr_mgr.cpp b/intel-pfr-manager/service/src/pfr_mgr.cpp index ed97fd2..b773916 100644 --- a/intel-pfr-manager/service/src/pfr_mgr.cpp +++ b/intel-pfr-manager/service/src/pfr_mgr.cpp @@ -59,12 +59,20 @@ PfrVersion::PfrVersion(sdbusplus::asio::object_server &srv_, * xyz.openbmc_project.Software.Version. since these versions are already * active, so we should set "activation" to Active and * "RequestedActivation" to None. */ - std::string activation = - (imgType == ImageType::bmcRecovery || - imgType == ImageType::biosRecovery || - imgType == ImageType::cpldRecovery) - ? "xyz.openbmc_project.Software.Activation.Activations.StandbySpare" - : "xyz.openbmc_project.Software.Activation.Activations.Active"; + std::string activation; + if (imgType == ImageType::bmcRecovery || + imgType == ImageType::biosRecovery || + imgType == ImageType::cpldRecovery) + { + activation = + "xyz.openbmc_project.Software.Activation.Activations.StandbySpare"; + } + else + { + activation = + "xyz.openbmc_project.Software.Activation.Activations.Active"; + } + std::string reqActNone = "xyz.openbmc_project.Software.Activation.RequestedActivations.None"; auto activationIface = server.add_interface( -- cgit v1.2.3