mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-30 05:29:43 +01:00
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:
@@ -48,6 +48,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
zmq::udp_engine_t::udp_engine_t() :
|
||||
plugged (false),
|
||||
fd(NULL),
|
||||
address(nullptr),
|
||||
send_enabled(false),
|
||||
recv_enabled(false),
|
||||
handle(NULL),
|
||||
session(NULL)
|
||||
{
|
||||
}
|
||||
@@ -122,7 +127,7 @@ void zmq::udp_engine_t::plug (io_thread_t* io_thread_, session_base_t *session_)
|
||||
struct ip_mreq mreq;
|
||||
mreq.imr_multiaddr = address->resolved.udp_addr->multicast_ip ();
|
||||
mreq.imr_interface = address->resolved.udp_addr->interface_ip ();
|
||||
int rc = setsockopt (fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char*) &mreq, sizeof (mreq));
|
||||
rc = setsockopt (fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char*) &mreq, sizeof (mreq));
|
||||
#ifdef ZMQ_HAVE_WINDOWS
|
||||
wsa_assert (rc != SOCKET_ERROR);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user