From e3166554684ccba7f4a16fc827f8cd048e2d2c84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Sun, 20 May 2018 12:13:03 +0200 Subject: [PATCH] lib,src,test: fix comments PR-URL: https://github.com/nodejs/node/pull/20846 Reviewed-By: Colin Ihrig Reviewed-By: Ruben Bridgewater Reviewed-By: James M Snell Reviewed-By: Daniel Bevenius Reviewed-By: Richard Lau --- lib/_stream_readable.js | 4 ++-- src/node.cc | 2 +- src/stream_base-inl.h | 2 +- src/tracing/node_trace_buffer.cc | 2 +- src/tracing/node_trace_writer.cc | 2 +- test/sequential/test-timers-blocking-callback.js | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index d00728b112d..7c11978c12b 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -834,7 +834,7 @@ Readable.prototype.removeListener = function(ev, fn) { if (ev === 'readable') { // We need to check if there is someone still listening to - // to readable and reset the state. However this needs to happen + // readable and reset the state. However this needs to happen // after readable has been emitted but before I/O (nextTick) to // support once('readable', fn) cycles. This means that calling // resume within the same tick will have no @@ -850,7 +850,7 @@ Readable.prototype.removeAllListeners = function(ev) { if (ev === 'readable' || ev === undefined) { // We need to check if there is someone still listening to - // to readable and reset the state. However this needs to happen + // readable and reset the state. However this needs to happen // after readable has been emitted but before I/O (nextTick) to // support once('readable', fn) cycles. This means that calling // resume within the same tick will have no diff --git a/src/node.cc b/src/node.cc index 27fccca6ee0..4ed10b4d68e 100644 --- a/src/node.cc +++ b/src/node.cc @@ -2370,7 +2370,7 @@ static void EnvGetter(Local property, arraysize(buffer)); // If result >= sizeof buffer the buffer was too small. That should never // happen. If result == 0 and result != ERROR_SUCCESS the variable was not - // not found. + // found. if ((result > 0 || GetLastError() == ERROR_SUCCESS) && result < arraysize(buffer)) { const uint16_t* two_byte_buffer = reinterpret_cast(buffer); diff --git a/src/stream_base-inl.h b/src/stream_base-inl.h index cfe0de0872d..b1e820b09f7 100644 --- a/src/stream_base-inl.h +++ b/src/stream_base-inl.h @@ -70,7 +70,7 @@ inline StreamResource::~StreamResource() { StreamListener* listener = listener_; listener->OnStreamDestroy(); // Remove the listener if it didn’t remove itself. This makes the logic - // logic in `OnStreamDestroy()` implementations easier, because they + // in `OnStreamDestroy()` implementations easier, because they // may call generic cleanup functions which can just remove the // listener unconditionally. if (listener == listener_) diff --git a/src/tracing/node_trace_buffer.cc b/src/tracing/node_trace_buffer.cc index 1765b88df1e..6e552d659ad 100644 --- a/src/tracing/node_trace_buffer.cc +++ b/src/tracing/node_trace_buffer.cc @@ -134,7 +134,7 @@ bool NodeTraceBuffer::Flush() { } // Attempts to set current_buf_ such that it references a buffer that can -// can write at least one trace event. If both buffers are unavailable this +// write at least one trace event. If both buffers are unavailable this // method returns false; otherwise it returns true. bool NodeTraceBuffer::TryLoadAvailableBuffer() { InternalTraceBuffer* prev_buf = current_buf_.load(); diff --git a/src/tracing/node_trace_writer.cc b/src/tracing/node_trace_writer.cc index 88ff3e6e7c1..a2f7bebfc72 100644 --- a/src/tracing/node_trace_writer.cc +++ b/src/tracing/node_trace_writer.cc @@ -153,7 +153,7 @@ void NodeTraceWriter::WriteToFile(std::string&& str, int highest_request_id) { write_req->str.length()); request_mutex_.Lock(); // Manage a queue of WriteRequest objects because the behavior of uv_write is - // is undefined if the same WriteRequest object is used more than once + // undefined if the same WriteRequest object is used more than once // between WriteCb calls. In addition, this allows us to keep track of the id // of the latest write request that actually been completed. write_req_queue_.push(write_req); diff --git a/test/sequential/test-timers-blocking-callback.js b/test/sequential/test-timers-blocking-callback.js index 22697cbd780..435b69d1fa8 100644 --- a/test/sequential/test-timers-blocking-callback.js +++ b/test/sequential/test-timers-blocking-callback.js @@ -3,7 +3,7 @@ /* * This is a regression test for * https://github.com/nodejs/node-v0.x-archive/issues/15447 and - * and https://github.com/nodejs/node-v0.x-archive/issues/9333. + * https://github.com/nodejs/node-v0.x-archive/issues/9333. * * When a timer is added in another timer's callback, its underlying timer * handle was started with a timeout that was actually incorrect.