Skip to content

Commit 05cbd8f

Browse files
himself65codebytere
authored andcommitted
src: use const in constant args.Length()
PR-URL: #33555 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Richard Lau <[email protected]>
1 parent bba41bf commit 05cbd8f

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
@@ -1037,7 +1037,7 @@ static void Symlink(const FunctionCallbackInfo<Value>& args) {
10371037
Environment* env = Environment::GetCurrent(args);
10381038
Isolate* isolate = env->isolate();
10391039

1040-
int argc = args.Length();
1040+
const int argc = args.Length();
10411041
CHECK_GE(argc, 4);
10421042

10431043
BufferValue target(isolate, args[0]);
@@ -1066,7 +1066,7 @@ static void Link(const FunctionCallbackInfo<Value>& args) {
10661066
Environment* env = Environment::GetCurrent(args);
10671067
Isolate* isolate = env->isolate();
10681068

1069-
int argc = args.Length();
1069+
const int argc = args.Length();
10701070
CHECK_GE(argc, 3);
10711071

10721072
BufferValue src(isolate, args[0]);
@@ -1093,7 +1093,7 @@ static void ReadLink(const FunctionCallbackInfo<Value>& args) {
10931093
Environment* env = Environment::GetCurrent(args);
10941094
Isolate* isolate = env->isolate();
10951095

1096-
int argc = args.Length();
1096+
const int argc = args.Length();
10971097
CHECK_GE(argc, 3);
10981098

10991099
BufferValue path(isolate, args[0]);
@@ -1136,7 +1136,7 @@ static void Rename(const FunctionCallbackInfo<Value>& args) {
11361136
Environment* env = Environment::GetCurrent(args);
11371137
Isolate* isolate = env->isolate();
11381138

1139-
int argc = args.Length();
1139+
const int argc = args.Length();
11401140
CHECK_GE(argc, 3);
11411141

11421142
BufferValue old_path(isolate, args[0]);

0 commit comments

Comments
 (0)