Commit 3aa5a9d4 authored by Pieter Hintjens's avatar Pieter Hintjens

Merge pull request #1202 from pavel-pimenov/fix-pvs-studio

PVS Studio small fix
parents 432c8496 18ee219c
...@@ -494,7 +494,7 @@ void zmq::session_base_t::start_connecting (bool wait_) ...@@ -494,7 +494,7 @@ void zmq::session_base_t::start_connecting (bool wait_)
// Create the connecter object. // Create the connecter object.
if (addr->protocol == "tcp") { if (addr->protocol == "tcp") {
if (options.socks_proxy_address != "") { if (!options.socks_proxy_address.empty()) {
address_t *proxy_address = new (std::nothrow) address_t *proxy_address = new (std::nothrow)
address_t ("tcp", options.socks_proxy_address); address_t ("tcp", options.socks_proxy_address);
alloc_assert (proxy_address); alloc_assert (proxy_address);
......
...@@ -96,7 +96,7 @@ zmq::stream_engine_t::stream_engine_t (fd_t fd_, const options_t &options_, ...@@ -96,7 +96,7 @@ zmq::stream_engine_t::stream_engine_t (fd_t fd_, const options_t &options_,
int family = get_peer_ip_address (s, peer_address); int family = get_peer_ip_address (s, peer_address);
if (family == 0) if (family == 0)
peer_address = ""; peer_address.clear();
#if defined ZMQ_HAVE_SO_PEERCRED #if defined ZMQ_HAVE_SO_PEERCRED
else else
if (family == PF_UNIX) { if (family == PF_UNIX) {
...@@ -781,7 +781,7 @@ void zmq::stream_engine_t::mechanism_ready () ...@@ -781,7 +781,7 @@ void zmq::stream_engine_t::mechanism_ready ()
it = zap_properties.begin (); it = zap_properties.begin ();
while (it != zap_properties.end ()) { while (it != zap_properties.end ()) {
properties.insert (properties_t::value_type (it->first, it->second)); properties.insert (properties_t::value_type (it->first, it->second));
it++; ++it;
} }
// Add ZMTP properties. // Add ZMTP properties.
...@@ -789,7 +789,7 @@ void zmq::stream_engine_t::mechanism_ready () ...@@ -789,7 +789,7 @@ void zmq::stream_engine_t::mechanism_ready ()
it = zmtp_properties.begin (); it = zmtp_properties.begin ();
while (it != zmtp_properties.end ()) { while (it != zmtp_properties.end ()) {
properties.insert (properties_t::value_type (it->first, it->second)); properties.insert (properties_t::value_type (it->first, it->second));
it++; ++it;
} }
zmq_assert (metadata == NULL); zmq_assert (metadata == NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment