diff options
author | Ratan Gupta <ratagupt@in.ibm.com> | 2018-05-04 16:59:55 +0530 |
---|---|---|
committer | Ratan Gupta <ratagupt@in.ibm.com> | 2018-05-04 16:59:55 +0530 |
commit | 057ff0daf0fd4d2617c5e50e2f9a095e06e3c24b (patch) | |
tree | 9e24dc4d0e38a91ab4798b13944b37415027c9ab /ethernet_interface.cpp | |
parent | 3e60e07a92230d259d702b6128aa22814b3879b1 (diff) | |
download | phosphor-networkd-057ff0daf0fd4d2617c5e50e2f9a095e06e3c24b.tar.gz phosphor-networkd-057ff0daf0fd4d2617c5e50e2f9a095e06e3c24b.zip |
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>
Diffstat (limited to 'ethernet_interface.cpp')
-rw-r--r-- | ethernet_interface.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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 @@ void EthernetInterface::createIPAddressObjects() gateway); this->addrs.emplace( - std::move(addr.ipaddress), + addr.ipaddress, std::make_shared<phosphor::network::IPAddress>( bus, ipAddressObjectPath.c_str(), @@ -158,7 +158,7 @@ void EthernetInterface::iP(IP::Protocol protType, prefixLength, gateway); this->addrs.emplace( - std::move(ipaddress), + ipaddress, std::make_shared<phosphor::network::IPAddress>( bus, objectPath.c_str(), |