Commit 3f4e64ed authored by Simon Giesecke's avatar Simon Giesecke

Problem: bind_to_device unnecessarily accepts a non-const string parameter

Solution: add const
parent 12c4b55a
......@@ -237,7 +237,7 @@ int zmq::set_nosigpipe (fd_t s_)
return 0;
}
void zmq::bind_to_device (fd_t s_, std::string &bound_device_)
void zmq::bind_to_device (fd_t s_, const std::string &bound_device_)
{
#ifdef ZMQ_HAVE_SO_BINDTODEVICE
int rc = setsockopt (s_, SOL_SOCKET, SO_BINDTODEVICE,
......
......@@ -56,7 +56,7 @@ void set_ip_type_of_service (fd_t s_, int iptos_);
int set_nosigpipe (fd_t s_);
// Binds the underlying socket to the given device, eg. VRF or interface
void bind_to_device (fd_t s_, std::string &bound_device_);
void bind_to_device (fd_t s_, const std::string &bound_device_);
// Initialize network subsystem. May be called multiple times. Each call must be matched by a call to shutdown_network.
bool initialize_network ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment