Index: net/quic/port_suggester.cc |
diff --git a/net/quic/port_suggester.cc b/net/quic/port_suggester.cc |
index 6b7940e83efae21a49750ded5b579d151196d71b..ddb5e245d05db35c2a0737fb51750d74b58bbad6 100644 |
--- a/net/quic/port_suggester.cc |
+++ b/net/quic/port_suggester.cc |
@@ -10,12 +10,12 @@ |
namespace net { |
PortSuggester::PortSuggester(const HostPortPair& server, uint64 seed) |
- : call_count_(0), |
- previous_suggestion_(-1) { |
+ : call_count_(0), previous_suggestion_(-1) { |
unsigned char hash_bytes[base::kSHA1Length]; |
base::SHA1HashBytes( |
reinterpret_cast<const unsigned char*>(server.host().data()), |
- server.host().length(), hash_bytes); |
+ server.host().length(), |
+ hash_bytes); |
COMPILE_ASSERT(sizeof(seed_) < sizeof(hash_bytes), seed_larger_than_hash); |
memcpy(&seed_, hash_bytes, sizeof(seed_)); |
seed_ ^= seed ^ server.port(); |
@@ -27,8 +27,9 @@ int PortSuggester::SuggestPort(int min, int max) { |
if (++call_count_ > 1) { |
// Evolve the seed. |
unsigned char hash_bytes[base::kSHA1Length]; |
- base::SHA1HashBytes(reinterpret_cast<const unsigned char *>(&seed_), |
- sizeof(seed_), hash_bytes); |
+ base::SHA1HashBytes(reinterpret_cast<const unsigned char*>(&seed_), |
+ sizeof(seed_), |
+ hash_bytes); |
memcpy(&seed_, hash_bytes, sizeof(seed_)); |
} |
DCHECK_LE(min, max); |