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>
This commit is contained in:
Anna Henningsen committed 2020-09-22 19:53:37 +02:00
1 parent b2241e9fc1
commit a2141d32ed
1 file changed
+1 -3
+1 -3
View File
@@ -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