Index: webrtc/p2p/base/tcpport.cc |
diff --git a/webrtc/p2p/base/tcpport.cc b/webrtc/p2p/base/tcpport.cc |
index 11997871f06308e03fba12cdc76e2727c4d310d3..c43cfeb561a1858e9af7dc804ca9632875d4d4a5 100644 |
--- a/webrtc/p2p/base/tcpport.cc |
+++ b/webrtc/p2p/base/tcpport.cc |
@@ -92,7 +92,7 @@ TCPPort::TCPPort(rtc::Thread* thread, |
password), |
incoming_only_(false), |
allow_listen_(allow_listen), |
- socket_(NULL), |
+ socket_(nullptr), |
error_(0) { |
// TODO(mallinath) - Set preference value as per RFC 6544. |
// http://b/issue?id=7141794 |
@@ -126,35 +126,35 @@ TCPPort::~TCPPort() { |
Connection* TCPPort::CreateConnection(const Candidate& address, |
CandidateOrigin origin) { |
if (!SupportsProtocol(address.protocol())) { |
- return NULL; |
+ return nullptr; |
} |
if (address.tcptype() == TCPTYPE_ACTIVE_STR || |
(address.tcptype().empty() && address.address().port() == 0)) { |
// It's active only candidate, we should not try to create connections |
// for these candidates. |
- return NULL; |
+ return nullptr; |
} |
// We can't accept TCP connections incoming on other ports |
if (origin == ORIGIN_OTHER_PORT) |
- return NULL; |
+ return nullptr; |
// Check if we are allowed to make outgoing TCP connections |
if (incoming_only_ && (origin == ORIGIN_MESSAGE)) |
- return NULL; |
+ return nullptr; |
// We don't know how to act as an ssl server yet |
if ((address.protocol() == SSLTCP_PROTOCOL_NAME) && |
(origin == ORIGIN_THIS_PORT)) { |
- return NULL; |
+ return nullptr; |
} |
if (!IsCompatibleAddress(address.address())) { |
- return NULL; |
+ return nullptr; |
} |
- TCPConnection* conn = NULL; |
+ TCPConnection* conn = nullptr; |
if (rtc::AsyncPacketSocket* socket = |
GetIncoming(address.address(), true)) { |
socket->SignalReadPacket.disconnect(this); |
@@ -196,7 +196,7 @@ int TCPPort::SendTo(const void* data, size_t size, |
const rtc::SocketAddress& addr, |
const rtc::PacketOptions& options, |
bool payload) { |
- rtc::AsyncPacketSocket * socket = NULL; |
+ rtc::AsyncPacketSocket* socket = nullptr; |
TCPConnection* conn = static_cast<TCPConnection*>(GetConnection(addr)); |
// For Connection, this is the code path used by Ping() to establish |
@@ -267,7 +267,7 @@ void TCPPort::OnNewConnection(rtc::AsyncPacketSocket* socket, |
rtc::AsyncPacketSocket* TCPPort::GetIncoming( |
const rtc::SocketAddress& addr, bool remove) { |
- rtc::AsyncPacketSocket* socket = NULL; |
+ rtc::AsyncPacketSocket* socket = nullptr; |
for (std::list<Incoming>::iterator it = incoming_.begin(); |
it != incoming_.end(); ++it) { |
if (it->addr == addr) { |
@@ -309,7 +309,7 @@ TCPConnection::TCPConnection(TCPPort* port, |
: Connection(port, 0, candidate), |
socket_(socket), |
error_(0), |
- outgoing_(socket == NULL), |
+ outgoing_(socket == nullptr), |
connection_pending_(false), |
pretending_to_be_writable_(false), |
reconnection_timeout_(cricket::CONNECTION_WRITE_CONNECT_TIMEOUT) { |