diff options
author | cjihrig <cjihrig@gmail.com> | 2018-10-06 23:17:17 +0300 |
---|---|---|
committer | Michaƫl Zasso <targos@protonmail.com> | 2018-10-10 05:15:57 +0300 |
commit | 56c2f5702fc8baf70661d3788a1211abe2cb0ffc (patch) | |
tree | 5c369011eac16877bd5e39081351e0cfe801f444 /src | |
parent | 046fd987e4a0102e60c835c2286dfff5cb86cde1 (diff) |
src: reduce variable scope in node_trace_writer.cc
PR-URL: https://github.com/nodejs/node/pull/23297
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/tracing/node_trace_writer.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/tracing/node_trace_writer.cc b/src/tracing/node_trace_writer.cc index a0382e587b3..1d06c942332 100644 --- a/src/tracing/node_trace_writer.cc +++ b/src/tracing/node_trace_writer.cc @@ -49,10 +49,8 @@ void NodeTraceWriter::WriteSuffix() { NodeTraceWriter::~NodeTraceWriter() { WriteSuffix(); uv_fs_t req; - int err; if (fd_ != -1) { - err = uv_fs_close(nullptr, &req, fd_, nullptr); - CHECK_EQ(err, 0); + CHECK_EQ(0, uv_fs_close(nullptr, &req, fd_, nullptr)); uv_fs_req_cleanup(&req); } uv_async_send(&exit_signal_); |