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

Unified Diff: net/base/listen_socket_unittest.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: Rebase. 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
« no previous file with comments | « net/base/listen_socket.cc ('k') | net/base/net_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/listen_socket_unittest.cc
diff --git a/net/base/listen_socket_unittest.cc b/net/base/listen_socket_unittest.cc
index d3a7eb5b61896fae51b62d71927f3f9673c924af..d5ba8cf6f0d456ff5dc50145d29b0667529cae80 100644
--- a/net/base/listen_socket_unittest.cc
+++ b/net/base/listen_socket_unittest.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/eintr_wrapper.h"
+#include "base/sys_byteorder.h"
#include "net/base/net_util.h"
#include "testing/platform_test.h"
@@ -50,7 +51,7 @@ void ListenSocketTester::SetUp() {
struct sockaddr_in client;
client.sin_family = AF_INET;
client.sin_addr.s_addr = inet_addr(kLoopback);
- client.sin_port = htons(kTestPort);
+ client.sin_port = base::HostToNet16(kTestPort);
int ret = HANDLE_EINTR(
connect(test_socket_, reinterpret_cast<sockaddr*>(&client),
sizeof(client)));
« no previous file with comments | « net/base/listen_socket.cc ('k') | net/base/net_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698