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: I59b1cef85e4e0e5dd14b33a4e1bc15aaef2a8aac
diff --git a/procedures/phal/start_host.cpp b/procedures/phal/start_host.cpp
index 51e46ab..af83d01 100644
--- a/procedures/phal/start_host.cpp
+++ b/procedures/phal/start_host.cpp
@@ -242,9 +242,7 @@
auto reply = bus.call(method);
- std::variant<bool> resp;
-
- reply.read(resp);
+ auto resp = reply.unpack<std::variant<bool>>();
if (const bool* enabledPropVal = std::get_if<bool>(&resp))
{