summaryrefslogtreecommitdiff
path: root/redfish-core/lib/hypervisor_system.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'redfish-core/lib/hypervisor_system.hpp')
-rw-r--r--redfish-core/lib/hypervisor_system.hpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/redfish-core/lib/hypervisor_system.hpp b/redfish-core/lib/hypervisor_system.hpp
index 78bf6269a5..2b27fb4824 100644
--- a/redfish-core/lib/hypervisor_system.hpp
+++ b/redfish-core/lib/hypervisor_system.hpp
@@ -585,11 +585,10 @@ inline void handleHypervisorIPv4StaticPatch(
// address
const nlohmann::json& thisJson = input[0];
- // For the error string
- std::string pathString = "IPv4StaticAddresses/1";
-
if (!thisJson.is_null() && !thisJson.empty())
{
+ // For the error string
+ std::string pathString = "IPv4StaticAddresses/1";
std::optional<std::string> address;
std::optional<std::string> subnetMask;
std::optional<std::string> gateway;