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

Unified Diff: net/quic/crypto/strike_register.cc

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « net/quic/crypto/source_address_token.cc ('k') | net/quic/quic_bandwidth.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/strike_register.cc
diff --git a/net/quic/crypto/strike_register.cc b/net/quic/crypto/strike_register.cc
index d727ece8cef621f8e4f721a4b093276ca8432049..fd5dc4fa925a8dbf90adcd30c45b2d3aeeee2e21 100644
--- a/net/quic/crypto/strike_register.cc
+++ b/net/quic/crypto/strike_register.cc
@@ -66,9 +66,9 @@ class StrikeRegister::InternalNode {
uint32 child(unsigned n) const { return data_[n] >> 8; }
- uint8 critbyte() const { return data_[0]; }
+ uint8 critbyte() const { return static_cast<uint8>(data_[0]); }
- uint8 otherbits() const { return data_[1]; }
+ uint8 otherbits() const { return static_cast<uint8>(data_[1]); }
// These bytes are organised thus:
// <24 bits> left child
@@ -194,9 +194,10 @@ InsertStatus StrikeRegister::Insert(const uint8 nonce[32],
}
// Now we need to find the first bit where we differ from |best_match|.
- unsigned differing_byte;
+ uint8 differing_byte;
uint8 new_other_bits;
- for (differing_byte = 0; differing_byte < sizeof(value); differing_byte++) {
+ for (differing_byte = 0; differing_byte < arraysize(value);
+ differing_byte++) {
new_other_bits = value[differing_byte] ^ best_match[differing_byte];
if (new_other_bits) {
break;
« no previous file with comments | « net/quic/crypto/source_address_token.cc ('k') | net/quic/quic_bandwidth.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698