summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2020-07-09 20:28:21 +0200
committerMyles Borins <mylesborins@github.com>2020-07-16 17:09:10 -0400
commit9c12e53d47cad78bfb79f5c61bf1cb4134aa6fb7 (patch)
tree7278ea6de6e76a5d9302b11ac513516c513bd7ce
parent3ee8f5342ccba4c2a56de3f2faa3747b73952159 (diff)
downloadnode-new-9c12e53d47cad78bfb79f5c61bf1cb4134aa6fb7.tar.gz
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>
-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 7d1e1b1d7d..ac5739b993 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