Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Nießen <tniessen@tnie.de>2018-05-20 18:44:06 +0300
committerTobias Nießen <tniessen@tnie.de>2018-05-26 13:29:31 +0300
commit39f209649fc290fe92cc3b87edfffa6a854ecb03 (patch)
treee7c7c595355c3ce1dbd59d89070a7427572d256f /src/spawn_sync.cc
parent13493e99bfd208bc6e5381a918384049384cc2ed (diff)
src: add CHECK_NULL/CHECK_NOT_NULL macros
This change introduces CHECK_NULL and CHECK_NOT_NULL macros similar to their definition in v8 and replaces instances of CHECK/CHECK_EQ/CHECK_NE with these where it seems appropriate. PR-URL: https://github.com/nodejs/node/pull/20914 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'src/spawn_sync.cc')
-rw-r--r--src/spawn_sync.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/spawn_sync.cc b/src/spawn_sync.cc
index 525aa4df2bc..8bc50c7586c 100644
--- a/src/spawn_sync.cc
+++ b/src/spawn_sync.cc
@@ -149,7 +149,7 @@ int SyncProcessStdioPipe::Start() {
if (readable()) {
if (input_buffer_.len > 0) {
- CHECK_NE(input_buffer_.base, nullptr);
+ CHECK_NOT_NULL(input_buffer_.base);
int r = uv_write(&write_req_,
uv_stream(),
@@ -547,7 +547,7 @@ void SyncProcessRunner::CloseStdioPipes() {
if (stdio_pipes_initialized_) {
CHECK(stdio_pipes_);
- CHECK_NE(uv_loop_, nullptr);
+ CHECK_NOT_NULL(uv_loop_);
for (uint32_t i = 0; i < stdio_count_; i++) {
if (stdio_pipes_[i])
@@ -564,7 +564,7 @@ void SyncProcessRunner::CloseKillTimer() {
if (kill_timer_initialized_) {
CHECK_GT(timeout_, 0);
- CHECK_NE(uv_loop_, nullptr);
+ CHECK_NOT_NULL(uv_loop_);
uv_handle_t* uv_timer_handle = reinterpret_cast<uv_handle_t*>(&uv_timer_);
uv_ref(uv_timer_handle);