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

Unified Diff: ppapi/shared_impl/private/net_address_private_impl.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 | « ppapi/shared_impl/private/net_address_private_impl.h ('k') | remoting/host/chromoting_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/private/net_address_private_impl.cc
diff --git a/ppapi/shared_impl/private/net_address_private_impl.cc b/ppapi/shared_impl/private/net_address_private_impl.cc
index 19dae3c8b180021cf3da23253c53feb3913f8ebc..04baf96fda2ccc54a00cee452cc9f2b5d103d095 100644
--- a/ppapi/shared_impl/private/net_address_private_impl.cc
+++ b/ppapi/shared_impl/private/net_address_private_impl.cc
@@ -451,7 +451,7 @@ bool NetAddressPrivateImpl::SockaddrToNetAddress(
// static
bool NetAddressPrivateImpl::IPEndPointToNetAddress(
const std::vector<unsigned char>& address,
- int port,
+ uint16 port,
PP_NetAddress_Private* addr) {
if (!addr)
return false;
@@ -461,14 +461,14 @@ bool NetAddressPrivateImpl::IPEndPointToNetAddress(
case kIPv4AddressSize: {
net_addr->is_valid = true;
net_addr->is_ipv6 = false;
- net_addr->port = static_cast<uint16_t>(port);
+ net_addr->port = port;
std::copy(address.begin(), address.end(), net_addr->address);
break;
}
case kIPv6AddressSize: {
net_addr->is_valid = true;
net_addr->is_ipv6 = true;
- net_addr->port = static_cast<uint16_t>(port);
+ net_addr->port = port;
std::copy(address.begin(), address.end(), net_addr->address);
break;
}
@@ -484,7 +484,7 @@ bool NetAddressPrivateImpl::IPEndPointToNetAddress(
bool NetAddressPrivateImpl::NetAddressToIPEndPoint(
const PP_NetAddress_Private& addr,
std::vector<unsigned char>* address,
- int* port) {
+ uint16* port) {
if (!address || !port)
return false;
« no previous file with comments | « ppapi/shared_impl/private/net_address_private_impl.h ('k') | remoting/host/chromoting_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698