diff options
Diffstat (limited to 'redfish-core/lib/systems.hpp')
-rw-r--r-- | redfish-core/lib/systems.hpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp index d6805374d3..62bd11b097 100644 --- a/redfish-core/lib/systems.hpp +++ b/redfish-core/lib/systems.hpp @@ -176,7 +176,7 @@ inline void getProcessorProperties( const uint16_t* coreCountVal = std::get_if<uint16_t>(&property.second); - if (!coreCountVal) + if (coreCountVal == nullptr) { messages::internalError(aResp->res); return; @@ -1574,7 +1574,8 @@ inline void setBootModeOrSource(const std::shared_ptr<bmcweb::AsyncResp>& aResp, // Source target specified BMCWEB_LOG_DEBUG << "Boot source: " << *bootSource; // Figure out which DBUS interface and property to use - if (assignBootParameters(aResp, *bootSource, bootSourceStr, bootModeStr)) + if (assignBootParameters(aResp, *bootSource, bootSourceStr, bootModeStr) != + 0) { BMCWEB_LOG_DEBUG << "Invalid property value for BootSourceOverrideTarget: " @@ -2238,7 +2239,7 @@ inline void { const bool* state = std::get_if<bool>(&property.second); - if (!state) + if (state == nullptr) { messages::internalError(aResp->res); return; @@ -2250,7 +2251,7 @@ inline void { const std::string* s = std::get_if<std::string>(&property.second); - if (!s) + if (s == nullptr) { messages::internalError(aResp->res); return; @@ -2353,7 +2354,7 @@ inline bool parseIpsProperties(const std::shared_ptr<bmcweb::AsyncResp>& aResp, if (property.first == "Enabled") { const bool* state = std::get_if<bool>(&property.second); - if (!state) + if (state == nullptr) { return false; } @@ -2362,7 +2363,7 @@ inline bool parseIpsProperties(const std::shared_ptr<bmcweb::AsyncResp>& aResp, else if (property.first == "EnterUtilizationPercent") { const uint8_t* util = std::get_if<uint8_t>(&property.second); - if (!util) + if (util == nullptr) { return false; } @@ -2373,7 +2374,7 @@ inline bool parseIpsProperties(const std::shared_ptr<bmcweb::AsyncResp>& aResp, // Convert Dbus time from milliseconds to seconds const uint64_t* timeMilliseconds = std::get_if<uint64_t>(&property.second); - if (!timeMilliseconds) + if (timeMilliseconds == nullptr) { return false; } @@ -2386,7 +2387,7 @@ inline bool parseIpsProperties(const std::shared_ptr<bmcweb::AsyncResp>& aResp, else if (property.first == "ExitUtilizationPercent") { const uint8_t* util = std::get_if<uint8_t>(&property.second); - if (!util) + if (util == nullptr) { return false; } @@ -2397,7 +2398,7 @@ inline bool parseIpsProperties(const std::shared_ptr<bmcweb::AsyncResp>& aResp, // Convert Dbus time from milliseconds to seconds const uint64_t* timeMilliseconds = std::get_if<uint64_t>(&property.second); - if (!timeMilliseconds) + if (timeMilliseconds == nullptr) { return false; } |