Take boost error_code by reference
By convention, we should be following boost here, and passing error_code
by reference, not by value. This makes our code consistent, and removes
the need for a copy in some cases.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Id42ea4a90b6685a84818b87d1506c11256b3b9ae
diff --git a/redfish-core/lib/memory.hpp b/redfish-core/lib/memory.hpp
index 6e77816..4478472 100644
--- a/redfish-core/lib/memory.hpp
+++ b/redfish-core/lib/memory.hpp
@@ -614,7 +614,7 @@
sdbusplus::asio::getAllProperties(
*crow::connections::systemBus, service, objPath, "",
[dimmId, aResp{std::move(aResp)}](
- const boost::system::error_code ec,
+ const boost::system::error_code& ec,
const dbus::utility::DBusPropertiesMap& properties) {
if (ec)
{
@@ -687,7 +687,7 @@
*crow::connections::systemBus, service, path,
"xyz.openbmc_project.Inventory.Item.PersistentMemory.Partition",
[aResp{std::move(aResp)}](
- const boost::system::error_code ec,
+ const boost::system::error_code& ec,
const dbus::utility::DBusPropertiesMap& properties) {
if (ec)
{