diff options
author | Daniel Bevenius <daniel.bevenius@gmail.com> | 2017-11-27 09:19:11 +0100 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2017-12-01 07:45:00 +0100 |
commit | e32bbbf4d7adfdb22822c39991ea0e972a0a3453 (patch) | |
tree | f2da83e4c0047e757c52cfc5de1f0c49fce922fb /src/tracing | |
parent | 85e34b0c73794d3a241aa9e0c6139292f445c30a (diff) | |
download | android-node-v8-e32bbbf4d7adfdb22822c39991ea0e972a0a3453.tar.gz android-node-v8-e32bbbf4d7adfdb22822c39991ea0e972a0a3453.tar.bz2 android-node-v8-e32bbbf4d7adfdb22822c39991ea0e972a0a3453.zip |
src: use nullptr instead of NULL
PR-URL: https://github.com/nodejs/node/pull/17373
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'src/tracing')
-rw-r--r-- | src/tracing/node_trace_buffer.cc | 6 | ||||
-rw-r--r-- | src/tracing/node_trace_writer.cc | 2 | ||||
-rw-r--r-- | src/tracing/trace_event.h | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/tracing/node_trace_buffer.cc b/src/tracing/node_trace_buffer.cc index c8d71b762e..4c9f7c658f 100644 --- a/src/tracing/node_trace_buffer.cc +++ b/src/tracing/node_trace_buffer.cc @@ -32,7 +32,7 @@ TraceObject* InternalTraceBuffer::GetEventByHandle(uint64_t handle) { Mutex::ScopedLock scoped_lock(mutex_); if (handle == 0) { // A handle value of zero never has a trace event associated with it. - return NULL; + return nullptr; } size_t chunk_index, event_index; uint32_t buffer_id, chunk_seq; @@ -41,12 +41,12 @@ TraceObject* InternalTraceBuffer::GetEventByHandle(uint64_t handle) { // Either the chunk belongs to the other buffer, or is outside the current // range of chunks loaded in memory (the latter being true suggests that // the chunk has already been flushed and is no longer in memory.) - return NULL; + return nullptr; } auto& chunk = chunks_[chunk_index]; if (chunk->seq() != chunk_seq) { // Chunk is no longer in memory. - return NULL; + return nullptr; } return chunk->GetEventAt(event_index); } diff --git a/src/tracing/node_trace_writer.cc b/src/tracing/node_trace_writer.cc index ff3c981d10..9293e9cb8f 100644 --- a/src/tracing/node_trace_writer.cc +++ b/src/tracing/node_trace_writer.cc @@ -60,7 +60,7 @@ void NodeTraceWriter::OpenNewFileForStreaming() { std::ostringstream log_file; log_file << "node_trace." << file_num_ << ".log"; fd_ = uv_fs_open(tracing_loop_, &req, log_file.str().c_str(), - O_CREAT | O_WRONLY | O_TRUNC, 0644, NULL); + O_CREAT | O_WRONLY | O_TRUNC, 0644, nullptr); CHECK_NE(fd_, -1); uv_fs_req_cleanup(&req); } diff --git a/src/tracing/trace_event.h b/src/tracing/trace_event.h index 2b4c1e36cf..44a30f38e5 100644 --- a/src/tracing/trace_event.h +++ b/src/tracing/trace_event.h @@ -518,7 +518,7 @@ static inline uint64_t AddTraceEvent( class ScopedTracer { public: // Note: members of data_ intentionally left uninitialized. See Initialize. - ScopedTracer() : p_data_(NULL) {} + ScopedTracer() : p_data_(nullptr) {} ~ScopedTracer() { if (p_data_ && *data_.category_group_enabled) |