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

Unified Diff: net/quic/quic_utils.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/quic_utils.cc
diff --git a/net/quic/quic_utils.cc b/net/quic/quic_utils.cc
index 7f1dd206e6d6c0fac452d134d15f2020d9901af0..d22a95a1406652ae04fc04e5bb656b4a27d1d936 100644
--- a/net/quic/quic_utils.cc
+++ b/net/quic/quic_utils.cc
@@ -52,7 +52,7 @@ uint128 QuicUtils::FNV1a_128_Hash(const char* data, int len) {
uint128 hash = kOffset;
for (int i = 0; i < len; ++i) {
- hash = hash ^ uint128(0, octets[i]);
+ hash = hash ^ uint128(0, octets[i]);
hash = hash * kPrime;
}
@@ -125,8 +125,8 @@ void QuicUtils::SerializeUint128Short(uint128 v, uint8* out) {
}
#define RETURN_STRING_LITERAL(x) \
-case x: \
-return #x;
+ case x: \
+ return #x;
// static
const char* QuicUtils::StreamErrorToString(QuicRstStreamErrorCode error) {
@@ -273,10 +273,10 @@ string QuicUtils::TagToString(QuicTag tag) {
// static
string QuicUtils::StringToHexASCIIDump(StringPiece in_buffer) {
int offset = 0;
- const int kBytesPerLine = 16; // Max bytes dumped per line
+ const int kBytesPerLine = 16; // Max bytes dumped per line
const char* buf = in_buffer.data();
int bytes_remaining = in_buffer.size();
- string s; // our output
+ string s; // our output
const char* p = buf;
while (bytes_remaining > 0) {
const int line_bytes = std::min(bytes_remaining, kBytesPerLine);
@@ -285,13 +285,14 @@ string QuicUtils::StringToHexASCIIDump(StringPiece in_buffer) {
if (i < line_bytes) {
base::StringAppendF(&s, "%02x", static_cast<unsigned char>(p[i]));
} else {
- s += " "; // two-space filler instead of two-space hex digits
+ s += " "; // two-space filler instead of two-space hex digits
}
- if (i % 2) s += ' ';
+ if (i % 2)
+ s += ' ';
}
s += ' ';
for (int i = 0; i < line_bytes; ++i) { // Do the ASCII dump
- s+= (p[i] > 32 && p[i] < 127) ? p[i] : '.';
+ s += (p[i] > 32 && p[i] < 127) ? p[i] : '.';
}
bytes_remaining -= line_bytes;

Powered by Google App Engine
This is Rietveld 408576698