Some code style improvements: removed redundant parentheses, added const, joined declaration and assignment of local variables

This commit is contained in:
Simon Giesecke
2018-08-09 12:22:29 +02:00
parent 89e5313114
commit 758f903db4
2 changed files with 14 additions and 17 deletions

View File

@@ -543,8 +543,6 @@ int zmq::socket_base_t::bind (const char *addr_)
session_base_t::create (io_thread, true, this, options, paddr);
errno_assert (session);
pipe_t *newpipe = NULL;
// Create a bi-directional pipe.
object_t *parents[2] = {this, session};
pipe_t *new_pipes[2] = {NULL, NULL};
@@ -556,7 +554,7 @@ int zmq::socket_base_t::bind (const char *addr_)
// Attach local end of the pipe to the socket object.
attach_pipe (new_pipes[0], true, true);
newpipe = new_pipes[0];
pipe_t *const newpipe = new_pipes[0];
// Attach remote end of the pipe to the session object later on.
session->attach_pipe (new_pipes[1]);
@@ -564,7 +562,7 @@ int zmq::socket_base_t::bind (const char *addr_)
// Save last endpoint URI
paddr->to_string (_last_endpoint);
add_endpoint (addr_, (own_t *) session, newpipe);
add_endpoint (addr_, static_cast<own_t *> (session), newpipe);
return 0;
}