Adding assert and not using unitialized value even though it wouldn't have mattered.

This commit is contained in:
clemahieu 2016-02-06 00:24:33 -06:00
commit fe11c2901d
2 changed files with 5 additions and 1 deletions

View file

@ -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 ();

View file

@ -671,6 +671,7 @@ std::unique_ptr <rai::block> rai::deserialize_block (rai::stream & stream_a, rai
break;
}
default:
assert (false);
break;
}
return result;