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/extensions/phal/dump_utils.cpp b/extensions/phal/dump_utils.cpp
index 6d2a666..984e30b 100644
--- a/extensions/phal/dump_utils.cpp
+++ b/extensions/phal/dump_utils.cpp
@@ -136,8 +136,7 @@
auto response = bus.call(method);
// reply will be type dbus::ObjectPath
- sdbusplus::message::object_path reply;
- response.read(reply);
+ auto reply = response.unpack<sdbusplus::message::object_path>();
// monitor dump progress
monitorDump(reply, dumpParameters.timeout);