Skip to content

Commit 21f1e64

Browse files
himself65codebytere
authored andcommitted
src: simplify format in node_file.cc
PR-URL: #33660 Reviewed-By: Anto Aravinth <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 61bb789 commit 21f1e64

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/node_file.cc

+4-4
Original file line numberDiff line numberDiff line change
@@ -454,9 +454,9 @@ int FileHandle::ReadStart() {
454454

455455
// Push the read wrap back to the freelist, or let it be destroyed
456456
// once we’re exiting the current scope.
457-
constexpr size_t wanted_freelist_fill = 100;
457+
constexpr size_t kWantedFreelistFill = 100;
458458
auto& freelist = handle->binding_data_->file_handle_read_wrap_freelist;
459-
if (freelist.size() < wanted_freelist_fill) {
459+
if (freelist.size() < kWantedFreelistFill) {
460460
read_wrap->Reset();
461461
freelist.emplace_back(std::move(read_wrap));
462462
}
@@ -721,7 +721,7 @@ void AfterScanDir(uv_fs_t* req) {
721721
int r;
722722
std::vector<Local<Value>> name_v;
723723

724-
for (int i = 0; ; i++) {
724+
for (;;) {
725725
uv_dirent_t ent;
726726

727727
r = uv_fs_scandir_next(req, &ent);
@@ -762,7 +762,7 @@ void AfterScanDirWithTypes(uv_fs_t* req) {
762762
std::vector<Local<Value>> name_v;
763763
std::vector<Local<Value>> type_v;
764764

765-
for (int i = 0; ; i++) {
765+
for (;;) {
766766
uv_dirent_t ent;
767767

768768
r = uv_fs_scandir_next(req, &ent);

0 commit comments

Comments
 (0)