Skip to content

Commit

Permalink
src: simplify format in node_file.cc
Browse files Browse the repository at this point in the history
PR-URL: #33660
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
himself65 authored and codebytere committed Jul 10, 2020
1 parent 86283aa commit 74843db
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/node_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -438,9 +438,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->env()->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));
}
Expand Down Expand Up @@ -705,7 +705,7 @@ void AfterScanDir(uv_fs_t* req) {
int r;
std::vector<Local<Value>> name_v;

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

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

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

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

0 comments on commit 74843db

Please sign in to comment.