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

Unified Diff: net/spdy/core/spdy_test_utils.cc

Issue 2895993003: Misc cleanup in net/spdy/core. (Closed)
Patch Set: Rebase. Created 3 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
« net/spdy/core/spdy_framer.cc ('K') | « net/spdy/core/spdy_protocol.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/core/spdy_test_utils.cc
diff --git a/net/spdy/core/spdy_test_utils.cc b/net/spdy/core/spdy_test_utils.cc
index 49098f3ba34fe82caa8421c9418ddaf62ecfd150..8d313cd8d1391263015d1d42c173c276a66d7ede 100644
--- a/net/spdy/core/spdy_test_utils.cc
+++ b/net/spdy/core/spdy_test_utils.cc
@@ -38,9 +38,9 @@ SpdyString HexDumpWithMarks(const unsigned char* data,
}
SpdyString hex;
- for (const unsigned char* row = data; length > 0;
+ for (const unsigned char *row = data; length > 0;
row += kColumns, length -= kColumns) {
- for (const unsigned char *p = row; p < row + 4; ++p) {
+ for (const unsigned char* p = row; p < row + 4; ++p) {
Biren Roy 2017/05/24 15:25:09 These two diffs, in conjunction, make me sad. :(
Bence 2017/05/24 15:38:48 You are not the only one. I tried to change it, b
if (p < row + length) {
const bool mark =
(marks && (p - data) < mark_length && marks[p - data]);
@@ -83,14 +83,14 @@ void CompareCharArraysWithHexError(const SpdyString& description,
for (int i = min_len; i < max_len; ++i) {
marks[i] = true;
}
- if (identical) return;
- ADD_FAILURE()
- << "Description:\n"
- << description
- << "\n\nExpected:\n"
- << HexDumpWithMarks(expected, expected_len, marks.get(), max_len)
- << "\nActual:\n"
- << HexDumpWithMarks(actual, actual_len, marks.get(), max_len);
+ if (identical)
+ return;
+ ADD_FAILURE() << "Description:\n"
+ << description << "\n\nExpected:\n"
+ << HexDumpWithMarks(expected, expected_len, marks.get(),
+ max_len)
+ << "\nActual:\n"
+ << HexDumpWithMarks(actual, actual_len, marks.get(), max_len);
}
void SetFrameFlags(SpdySerializedFrame* frame, uint8_t flags) {
« net/spdy/core/spdy_framer.cc ('K') | « net/spdy/core/spdy_protocol.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698