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

Unified Diff: remoting/protocol/chromium_socket_factory.cc

Issue 655063002: Use uint16 for port numbers more pervasively. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert bad change Created 6 years, 1 month 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 | « remoting/host/win/rdp_client.cc ('k') | remoting/protocol/network_settings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/chromium_socket_factory.cc
diff --git a/remoting/protocol/chromium_socket_factory.cc b/remoting/protocol/chromium_socket_factory.cc
index 0cfa1ad706e3b6f7ca68da5229d5a3007589d966..6777937d93d7b103d9b6f14a7b72edd2bec77157 100644
--- a/remoting/protocol/chromium_socket_factory.cc
+++ b/remoting/protocol/chromium_socket_factory.cc
@@ -122,10 +122,10 @@ bool UdpPacketSocket::Init(const rtc::SocketAddress& local_address,
return false;
}
- for (uint16 port = min_port; port <= max_port; ++port) {
+ for (uint32 port = min_port; port <= max_port; ++port) {
socket_.reset(new net::UDPServerSocket(NULL, net::NetLog::Source()));
int result = socket_->Listen(
- net::IPEndPoint(local_endpoint.address(), port));
+ net::IPEndPoint(local_endpoint.address(), static_cast<uint16>(port)));
if (result == net::OK) {
break;
} else {
« no previous file with comments | « remoting/host/win/rdp_client.cc ('k') | remoting/protocol/network_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698