Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/node_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,8 @@ 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;
auto& freelist = handle->binding_data_->file_handle_read_wrap_freelist;
if (freelist.size() < wanted_freelist_fill) {
if (freelist.size() < /* wanted_freelist_fill */ 100) {
read_wrap->Reset();
freelist.emplace_back(std::move(read_wrap));
}
Expand Down Expand Up @@ -721,7 +720,7 @@ void AfterScanDir(uv_fs_t* req) {
int r;
std::vector<Local<Value>> name_v;

for (int i = 0; ; i++) {
while (true) {
uv_dirent_t ent;

r = uv_fs_scandir_next(req, &ent);
Expand Down Expand Up @@ -762,7 +761,7 @@ void AfterScanDirWithTypes(uv_fs_t* req) {
std::vector<Local<Value>> name_v;
std::vector<Local<Value>> type_v;

for (int i = 0; ; i++) {
while (true) {
uv_dirent_t ent;

r = uv_fs_scandir_next(req, &ent);
Expand Down