Problem: Several problems found by Coverity Static Analyzer

Solution: The Coverity Static Code Analyzer was used on libzmq code and found
many issues with uninitialized member variables, some redefinition of variables
hidding previous instances of same variable name and a couple of functions
where return values were not checked, even though all other occurrences were
checked (e.g. init_size() return).
This commit is contained in:
Osiris
2016-02-21 15:49:47 -06:00
parent c5d8353429
commit b3d5fa63a0
44 changed files with 99 additions and 60 deletions

View File

@@ -155,9 +155,9 @@ void zmq::router_t::xpipe_terminated (pipe_t *pipe_)
if (it != anonymous_pipes.end ())
anonymous_pipes.erase (it);
else {
outpipes_t::iterator it = outpipes.find (pipe_->get_identity ());
zmq_assert (it != outpipes.end ());
outpipes.erase (it);
outpipes_t::iterator iter = outpipes.find (pipe_->get_identity ());
zmq_assert (iter != outpipes.end ());
outpipes.erase (iter);
fq.pipe_terminated (pipe_);
if (pipe_ == current_out)
current_out = NULL;