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

Unified Diff: net/base/net_util.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 | « net/base/ip_endpoint_unittest.cc ('k') | net/dns/dns_config_service_win_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_util.cc
diff --git a/net/base/net_util.cc b/net/base/net_util.cc
index 9dcf9dfccac8c82d4856c357ffc9b9c374c330f5..dcc1363ac23547f4c27d4e343bbaedbba7dc0160 100644
--- a/net/base/net_util.cc
+++ b/net/base/net_util.cc
@@ -306,7 +306,7 @@ bool IsPortAllowedByDefault(int port) {
return false;
}
}
- return true;
+ return IsPortValid(port);
}
bool IsPortAllowedByFtp(int port) {
@@ -573,7 +573,7 @@ bool GetIPAddressFromSockAddr(const struct sockaddr* sock_addr,
*address = reinterpret_cast<const uint8*>(&addr->btAddr);
*address_len = kBluetoothAddressSize;
if (port)
- *port = addr->port;
+ *port = static_cast<uint16>(addr->port);
return true;
}
#endif
« no previous file with comments | « net/base/ip_endpoint_unittest.cc ('k') | net/dns/dns_config_service_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698