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

Unified Diff: webrtc/media/sctp/sctptransport.cc

Issue 2685783014: Replace NULL with nullptr in all C++ files. (Closed)
Patch Set: Fixing android. Created 3 years, 10 months 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: webrtc/media/sctp/sctptransport.cc
diff --git a/webrtc/media/sctp/sctptransport.cc b/webrtc/media/sctp/sctptransport.cc
index ae69628a98b8a0031f1fe0d57ac5b5b92bf42bdf..6bf5d03c85df7944a22f2f2654cc23fc97154117 100644
--- a/webrtc/media/sctp/sctptransport.cc
+++ b/webrtc/media/sctp/sctptransport.cc
@@ -161,7 +161,7 @@ PayloadProtocolIdentifier GetPpid(cricket::DataMessageType type) {
bool GetDataMediaType(PayloadProtocolIdentifier ppid,
cricket::DataMessageType* dest) {
- RTC_DCHECK(dest != NULL);
+ RTC_DCHECK(dest != nullptr);
switch (ppid) {
case PPID_BINARY_PARTIAL:
case PPID_BINARY_LAST:
@@ -194,7 +194,7 @@ void VerboseLogPacket(const void* data, size_t length, int direction) {
// a non-const "void*" as first parameter when dumping the packet, so we
// need to cast the const away here to avoid a compiler error.
if ((dump_buf = usrsctp_dumppacket(const_cast<void*>(data), length,
- direction)) != NULL) {
+ direction)) != nullptr) {
LOG(LS_VERBOSE) << dump_buf;
usrsctp_freedumpbuffer(dump_buf);
}
@@ -543,8 +543,8 @@ bool SctpTransport::SendData(const SendDataParams& params,
// We don't fragment.
send_res = usrsctp_sendv(
- sock_, payload.data(), static_cast<size_t>(payload.size()), NULL, 0, &spa,
- rtc::checked_cast<socklen_t>(sizeof(spa)), SCTP_SENDV_SPA, 0);
+ sock_, payload.data(), static_cast<size_t>(payload.size()), nullptr, 0,
+ &spa, rtc::checked_cast<socklen_t>(sizeof(spa)), SCTP_SENDV_SPA, 0);
if (send_res < 0) {
if (errno == SCTP_EWOULDBLOCK) {
*result = SDR_BLOCK;
@@ -901,8 +901,8 @@ void SctpTransport::OnInboundPacketFromSctpToChannel(
<< " sid=" << params.sid
<< " notification: " << (flags & MSG_NOTIFICATION)
<< " length=" << buffer.size();
- // Sending a packet with data == NULL (no data) is SCTPs "close the
- // connection" message. This sets sock_ = NULL;
+ // Sending a packet with data == null (no data) is SCTPs "close the
+ // connection" message. This sets sock_ = null;
if (!buffer.size() || !buffer.data()) {
LOG(LS_INFO) << debug_name_ << "->OnInboundPacketFromSctpToChannel(...): "
"No data, closing.";

Powered by Google App Engine
This is Rietveld 408576698