mirror of
https://github.com/zeromq/libzmq.git
synced 2025-11-07 05:58:45 +01:00
Problem: pointee types are unnecessarily non-const
Solution: add const where possible
This commit is contained in:
@@ -93,7 +93,8 @@ int zmq::tipc_listener_t::set_local_address (const char *addr_)
|
||||
return -1;
|
||||
|
||||
// Cannot bind non-random Port Identity
|
||||
struct sockaddr_tipc *a = (sockaddr_tipc *) _address.addr ();
|
||||
const sockaddr_tipc *const a =
|
||||
reinterpret_cast<const sockaddr_tipc *> (_address.addr ());
|
||||
if (!_address.is_random () && a->addrtype == TIPC_ADDR_ID) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user