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

Unified Diff: net/quic/quic_framer.cc

Issue 662513007: Remove trivially-true checks in quic_framer.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wm_events
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_framer.cc
diff --git a/net/quic/quic_framer.cc b/net/quic/quic_framer.cc
index 83c44c00478471fa574894a160c18d8cddd4186c..7e914f878c03c69e3d9000ca619970607947b5db 100644
--- a/net/quic/quic_framer.cc
+++ b/net/quic/quic_framer.cc
@@ -1528,8 +1528,7 @@ bool QuicFramer::ProcessRstStreamFrame(QuicRstStreamFrame* frame) {
return false;
}
- if (error_code >= QUIC_STREAM_LAST_ERROR ||
- error_code < QUIC_STREAM_NO_ERROR) {
+ if (error_code >= QUIC_STREAM_LAST_ERROR) {
set_detailed_error("Invalid rst stream error code.");
return false;
}
@@ -1553,8 +1552,7 @@ bool QuicFramer::ProcessConnectionCloseFrame(QuicConnectionCloseFrame* frame) {
return false;
}
- if (error_code >= QUIC_LAST_ERROR ||
- error_code < QUIC_NO_ERROR) {
+ if (error_code >= QUIC_LAST_ERROR) {
set_detailed_error("Invalid error code.");
return false;
}
@@ -1579,8 +1577,7 @@ bool QuicFramer::ProcessGoAwayFrame(QuicGoAwayFrame* frame) {
}
frame->error_code = static_cast<QuicErrorCode>(error_code);
- if (error_code >= QUIC_LAST_ERROR ||
- error_code < QUIC_NO_ERROR) {
+ if (error_code >= QUIC_LAST_ERROR) {
set_detailed_error("Invalid error code.");
return false;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698