Index: net/base/net_util.cc |
diff --git a/net/base/net_util.cc b/net/base/net_util.cc |
index 9dcf9dfccac8c82d4856c357ffc9b9c374c330f5..3b49dffb5c20d889003a09755276ddaa8e41542d 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 |
@@ -1015,8 +1015,7 @@ bool IsLocalhost(const std::string& host) { |
} |
NetworkInterface::NetworkInterface() |
- : type(NetworkChangeNotifier::CONNECTION_UNKNOWN), |
- network_prefix(0) { |
+ : type(NetworkChangeNotifier::CONNECTION_UNKNOWN), prefix_length(0) { |
} |
NetworkInterface::NetworkInterface(const std::string& name, |
@@ -1024,14 +1023,14 @@ NetworkInterface::NetworkInterface(const std::string& name, |
uint32 interface_index, |
NetworkChangeNotifier::ConnectionType type, |
const IPAddressNumber& address, |
- uint32 network_prefix, |
+ uint32 prefix_length, |
int ip_address_attributes) |
: name(name), |
friendly_name(friendly_name), |
interface_index(interface_index), |
type(type), |
address(address), |
- network_prefix(network_prefix), |
+ prefix_length(prefix_length), |
ip_address_attributes(ip_address_attributes) { |
} |