From 12d168a6efe7a98be38ca9695a2b70f3553e0ca0 Mon Sep 17 00:00:00 2001 From: Erik Frojdh Date: Tue, 3 Dec 2019 10:12:47 +0100 Subject: [PATCH] const strref --- slsSupportLib/include/network_utils.h | 2 +- slsSupportLib/src/network_utils.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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];