Skip to content

Commit

Permalink
Merge pull request #1202 from pavel-pimenov/fix-pvs-studio
Browse files Browse the repository at this point in the history
PVS Studio small fix
  • Loading branch information
hintjens committed Oct 9, 2014
2 parents 432c849 + 18ee219 commit 3aa5a9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/session_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ void zmq::session_base_t::start_connecting (bool wait_)
// Create the connecter object.

if (addr->protocol == "tcp") {
if (options.socks_proxy_address != "") {
if (!options.socks_proxy_address.empty()) {
address_t *proxy_address = new (std::nothrow)
address_t ("tcp", options.socks_proxy_address);
alloc_assert (proxy_address);
Expand Down
6 changes: 3 additions & 3 deletions src/stream_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
if (family == 0)
peer_address = "";
peer_address.clear();
#if defined ZMQ_HAVE_SO_PEERCRED
else
if (family == PF_UNIX) {
Expand Down Expand Up @@ -781,15 +781,15 @@ void zmq::stream_engine_t::mechanism_ready ()
it = zap_properties.begin ();
while (it != zap_properties.end ()) {
properties.insert (properties_t::value_type (it->first, it->second));
it++;
++it;
}

// Add ZMTP properties.
const properties_t& zmtp_properties = mechanism->get_zmtp_properties ();
it = zmtp_properties.begin ();
while (it != zmtp_properties.end ()) {
properties.insert (properties_t::value_type (it->first, it->second));
it++;
++it;
}

zmq_assert (metadata == NULL);
Expand Down

0 comments on commit 3aa5a9d

Please sign in to comment.