Fixing unnecessary moving of variables
Prior to this fix variable was being used even its
memory was moved which can lead to undefined behaviour.
Change-Id: Ibb611fd699df6f30bcfeaa66d151920556dac64e
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
diff --git a/ethernet_interface.cpp b/ethernet_interface.cpp
index 51eaf85..35e61a7 100644
--- a/ethernet_interface.cpp
+++ b/ethernet_interface.cpp
@@ -93,7 +93,7 @@
gateway);
this->addrs.emplace(
- std::move(addr.ipaddress),
+ addr.ipaddress,
std::make_shared<phosphor::network::IPAddress>(
bus,
ipAddressObjectPath.c_str(),
@@ -158,7 +158,7 @@
prefixLength,
gateway);
this->addrs.emplace(
- std::move(ipaddress),
+ ipaddress,
std::make_shared<phosphor::network::IPAddress>(
bus,
objectPath.c_str(),