mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-28 11:31:56 +01:00
Problem: ptr/ref parameters and local variables are non-const but never modified
Solution: add const
This commit is contained in:
@@ -289,7 +289,7 @@ class msg_t
|
||||
inline int close_and_return (zmq::msg_t *msg_, int echo_)
|
||||
{
|
||||
// Since we abort on close failure we preserve errno for success case.
|
||||
int err = errno;
|
||||
const int err = errno;
|
||||
const int rc = msg_->close ();
|
||||
errno_assert (rc == 0);
|
||||
errno = err;
|
||||
|
||||
Reference in New Issue
Block a user