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

Unified Diff: net/udp/udp_socket_win.cc

Issue 718273002: Use uint16 for port numbers, net/ edition (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Self review 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
Index: net/udp/udp_socket_win.cc
diff --git a/net/udp/udp_socket_win.cc b/net/udp/udp_socket_win.cc
index b18aa0a53693403d727acee938022bb7b7012239..5d134f8616a8eb58afc80eda9dec74d9d5347418 100644
--- a/net/udp/udp_socket_win.cc
+++ b/net/udp/udp_socket_win.cc
@@ -805,8 +805,8 @@ int UDPSocketWin::RandomBind(const IPAddressNumber& address) {
DCHECK(bind_type_ == DatagramSocket::RANDOM_BIND && !rand_int_cb_.is_null());
for (int i = 0; i < kBindRetries; ++i) {
- int rv = DoBind(IPEndPoint(address,
- rand_int_cb_.Run(kPortStart, kPortEnd)));
+ int rv = DoBind(IPEndPoint(
+ address, static_cast<uint16>(rand_int_cb_.Run(kPortStart, kPortEnd))));
if (rv == OK || rv != ERR_ADDRESS_IN_USE)
return rv;
}
« net/test/embedded_test_server/embedded_test_server.cc ('K') | « net/udp/udp_socket_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698