diff --git a/slsSupportLib/include/network_utils.h b/slsSupportLib/include/network_utils.h index f91472acd..12bc4a125 100755 --- a/slsSupportLib/include/network_utils.h +++ b/slsSupportLib/include/network_utils.h @@ -60,7 +60,7 @@ class MacAddr { IpAddr HostnameToIp(const char *hostname); std::string IpToInterfaceName(const std::string& ip); -MacAddr InterfaceNameToMac(std::string inf); +MacAddr InterfaceNameToMac(const std::string& inf); std::ostream &operator<<(std::ostream &out, const IpAddr &addr); std::ostream &operator<<(std::ostream &out, const MacAddr &addr); diff --git a/slsSupportLib/src/network_utils.cpp b/slsSupportLib/src/network_utils.cpp index d930bec32..98637cb03 100755 --- a/slsSupportLib/src/network_utils.cpp +++ b/slsSupportLib/src/network_utils.cpp @@ -122,7 +122,7 @@ std::string IpToInterfaceName(const std::string &ip) { return std::string(buf); } -MacAddr InterfaceNameToMac(std::string inf) { +MacAddr InterfaceNameToMac(const std::string& inf) { //TODO! Copied from genericSocket needs to be refactored! struct ifreq ifr; char mac[32];