From 476157925be168b0bf1591aebb3d6795d55aa8f2 Mon Sep 17 00:00:00 2001 From: Myles Borins Date: Tue, 21 Jul 2020 13:23:45 -0400 Subject: [PATCH] Revert "src: simplify format in node_file.cc" This reverts commit 673f49ac94f47700a7f8a1af082df6fa57c925ef. This change is breaking gulp on v14.x. Reverting so we can reland in a way that doesn't break stuff Refs: https://github.com/nodejs/node/pull/33660 Refs: https://github.com/nodejs/node/pull/34371 --- 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 3e1cecdadc167a..07851e4978f93f 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -488,9 +488,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 kWantedFreelistFill = 100; + constexpr size_t wanted_freelist_fill = 100; auto& freelist = handle->binding_data_->file_handle_read_wrap_freelist; - if (freelist.size() < kWantedFreelistFill) { + if (freelist.size() < wanted_freelist_fill) { read_wrap->Reset(); freelist.emplace_back(std::move(read_wrap)); } @@ -758,7 +758,7 @@ void AfterScanDir(uv_fs_t* req) { int r; std::vector> name_v; - for (;;) { + for (int i = 0; ; i++) { uv_dirent_t ent; r = uv_fs_scandir_next(req, &ent); @@ -799,7 +799,7 @@ void AfterScanDirWithTypes(uv_fs_t* req) { std::vector> name_v; std::vector> type_v; - for (;;) { + for (int i = 0; ; i++) { uv_dirent_t ent; r = uv_fs_scandir_next(req, &ent);