From 21f1e64737314966b86d409ab5414712c9cde0c1 Mon Sep 17 00:00:00 2001 From: himself65 Date: Sat, 30 May 2020 17:40:15 +0800 Subject: [PATCH] src: simplify format in node_file.cc PR-URL: https://github.com/nodejs/node/pull/33660 Reviewed-By: Anto Aravinth Reviewed-By: James M Snell --- src/node_file.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/node_file.cc b/src/node_file.cc index 09af257b1b3780..c2ed56f43fb0ae 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -454,9 +454,9 @@ int FileHandle::ReadStart() { // Push the read wrap back to the freelist, or let it be destroyed // once we’re exiting the current scope. - constexpr size_t wanted_freelist_fill = 100; + constexpr size_t kWantedFreelistFill = 100; auto& freelist = handle->binding_data_->file_handle_read_wrap_freelist; - if (freelist.size() < wanted_freelist_fill) { + if (freelist.size() < kWantedFreelistFill) { read_wrap->Reset(); freelist.emplace_back(std::move(read_wrap)); } @@ -721,7 +721,7 @@ void AfterScanDir(uv_fs_t* req) { int r; std::vector> name_v; - for (int i = 0; ; i++) { + for (;;) { uv_dirent_t ent; r = uv_fs_scandir_next(req, &ent); @@ -762,7 +762,7 @@ void AfterScanDirWithTypes(uv_fs_t* req) { std::vector> name_v; std::vector> type_v; - for (int i = 0; ; i++) { + for (;;) { uv_dirent_t ent; r = uv_fs_scandir_next(req, &ent);