Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1233)

Unified Diff: net/quic/port_suggester.cc

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698