Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2020-07-09 21:28:21 +0300
committerAnna Henningsen <anna@addaleax.net>2020-07-14 16:05:56 +0300
commit4cac54362a146ee05f640ea68f810daa90a10406 (patch)
tree2d3e5763fafc6a8ce6a9446b16580ccadcc1649b /src/node_dir.cc
parent874460a1d19e149b58428c88890abe4407cd116e (diff)
src: remove redundant snprintf
PR-URL: https://github.com/nodejs/node/pull/34282 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_dir.cc')
-rw-r--r--src/node_dir.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/node_dir.cc b/src/node_dir.cc
index 7d1e1b1d7d6..ac5739b9932 100644
--- a/src/node_dir.cc
+++ b/src/node_dir.cc
@@ -108,9 +108,7 @@ inline void DirHandle::GCClose() {
if (ret < 0) {
// Do not unref this
env()->SetImmediate([detail](Environment* env) {
- char msg[70];
- snprintf(msg, arraysize(msg),
- "Closing directory handle on garbage collection failed");
+ const char* msg = "Closing directory handle on garbage collection failed";
// This exception will end up being fatal for the process because
// it is being thrown from within the SetImmediate handler and
// there is no JS stack to bubble it to. In other words, tearing