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

Unified Diff: net/spdy/spdy_frame_reader.cc

Issue 9716020: Add base::HostToNetXX() & NetToHostXX(), and use them to replace htonX() & ntohX() in Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Switch a few remaining call-sites. Created 8 years, 9 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/spdy/spdy_frame_reader.cc
diff --git a/net/spdy/spdy_frame_reader.cc b/net/spdy/spdy_frame_reader.cc
index 183bae909cadcaefaf7485940d41eb22adef10cd..ce56cc6e3d62cba06d98d73462ec6cd1f5674207 100644
--- a/net/spdy/spdy_frame_reader.cc
+++ b/net/spdy/spdy_frame_reader.cc
@@ -23,7 +23,7 @@ bool SpdyFrameReader::ReadUInt16(uint16* result) {
}
// Read into result.
- *result = ntohs(*(reinterpret_cast<const uint16*>(data_ + ofs_)));
+ *result = base::NetToHost16(*(reinterpret_cast<const uint16*>(data_ + ofs_)));
// Iterate.
ofs_ += 2;
@@ -39,7 +39,7 @@ bool SpdyFrameReader::ReadUInt32(uint32* result) {
}
// Read into result.
- *result = ntohl(*(reinterpret_cast<const uint32*>(data_ + ofs_)));
+ *result = base::NetToHost32(*(reinterpret_cast<const uint32*>(data_ + ofs_)));
// Iterate.
ofs_ += 4;

Powered by Google App Engine
This is Rietveld 408576698