From 05cbd8f6f2b795f621fe6f5c2cabe9cd365da685 Mon Sep 17 00:00:00 2001 From: himself65 Date: Mon, 25 May 2020 23:41:48 +0800 Subject: [PATCH] src: use const in constant args.Length() PR-URL: https://github.com/nodejs/node/pull/33555 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Richard Lau --- 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 b632a5590435de..089e45322ba686 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -1037,7 +1037,7 @@ static void Symlink(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); Isolate* isolate = env->isolate(); - int argc = args.Length(); + const int argc = args.Length(); CHECK_GE(argc, 4); BufferValue target(isolate, args[0]); @@ -1066,7 +1066,7 @@ static void Link(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); Isolate* isolate = env->isolate(); - int argc = args.Length(); + const int argc = args.Length(); CHECK_GE(argc, 3); BufferValue src(isolate, args[0]); @@ -1093,7 +1093,7 @@ static void ReadLink(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); Isolate* isolate = env->isolate(); - int argc = args.Length(); + const int argc = args.Length(); CHECK_GE(argc, 3); BufferValue path(isolate, args[0]); @@ -1136,7 +1136,7 @@ static void Rename(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); Isolate* isolate = env->isolate(); - int argc = args.Length(); + const int argc = args.Length(); CHECK_GE(argc, 3); BufferValue old_path(isolate, args[0]);