From 8c3faccc941d5b32722554f8f24f320fd02dd4ab Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Sun, 7 Apr 2024 13:52:22 -0700 Subject: Remove logically dead code This code path is subtle, but given that slotPresent is only set to true if totalCores is incremented, there's no way to actually hit this section of code. Looking for input on if this is the right behavior. Change-Id: Ie6dadd2c7a0ca6b8402148ddd9b8a369a4a38b2e Signed-off-by: Ed Tanous --- redfish-core/lib/processor.hpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'redfish-core') diff --git a/redfish-core/lib/processor.hpp b/redfish-core/lib/processor.hpp index 5c229f4f9f..7b22c86d2a 100644 --- a/redfish-core/lib/processor.hpp +++ b/redfish-core/lib/processor.hpp @@ -282,12 +282,6 @@ inline void getCpuDataByService(std::shared_ptr asyncResp, // count is zero, then it has a higher precedence. if (slotPresent) { - if (totalCores == 0) - { - // Slot is not populated, set status end return - asyncResp->res.jsonValue["Status"]["State"] = "Absent"; - asyncResp->res.jsonValue["Status"]["Health"] = "OK"; - } asyncResp->res.jsonValue["TotalCores"] = totalCores; } return; -- cgit v1.2.3