Skip to content

Commit

Permalink
Adding assert and not using unitialized value even though it wouldn't…
Browse files Browse the repository at this point in the history
… have mattered.
  • Loading branch information
clemahieu committed Feb 6, 2016
1 parent 82cfb5c commit fe11c29
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rai/node/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,10 @@ bool rai::node_config::deserialize_json (bool & upgraded_a, boost::property_tree
boost::asio::ip::address address;
uint16_t port;
result |= rai::parse_address_port (work_peer, address, port);
work_peers.push_back (std::make_pair (address, port));
if (!result)
{
work_peers.push_back (std::make_pair (address, port));
}
}
auto preconfigured_peers_l (tree_a.get_child ("preconfigured_peers"));
preconfigured_peers.clear ();
Expand Down
1 change: 1 addition & 0 deletions rai/secure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,7 @@ std::unique_ptr <rai::block> rai::deserialize_block (rai::stream & stream_a, rai
break;
}
default:
assert (false);
break;
}
return result;
Expand Down

0 comments on commit fe11c29

Please sign in to comment.