use sdbusplus unpack syntax
Rather than defining a variable and then reading it from a message,
sdbusplus also supports directly unpack-ing from the message. Use
this syntax instead as it is more efficient and succinct.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I5ff2aa545ba88d06ea6ac95b83a329c7dfe8594e
diff --git a/host_reset_recovery.cpp b/host_reset_recovery.cpp
index 6faf77e..7eff420 100644
--- a/host_reset_recovery.cpp
+++ b/host_reset_recovery.cpp
@@ -52,8 +52,8 @@
auto response = bus.call(method);
- std::variant<ProgressStages> bootProgressV;
- response.read(bootProgressV);
+ auto bootProgressV = response.unpack<std::variant<ProgressStages>>();
+
auto bootProgress = std::get<ProgressStages>(bootProgressV);
if (bootProgress == ProgressStages::Unspecified)