Skip to content

Commit a2141d3

Browse files
committed
src: remove redundant snprintf
PR-URL: #34282 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anto Aravinth <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent b2241e9 commit a2141d3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/node_dir.cc

+1-3
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,7 @@ inline void DirHandle::GCClose() {
108108
if (ret < 0) {
109109
// Do not unref this
110110
env()->SetImmediate([detail](Environment* env) {
111-
char msg[70];
112-
snprintf(msg, arraysize(msg),
113-
"Closing directory handle on garbage collection failed");
111+
const char* msg = "Closing directory handle on garbage collection failed";
114112
// This exception will end up being fatal for the process because
115113
// it is being thrown from within the SetImmediate handler and
116114
// there is no JS stack to bubble it to. In other words, tearing

0 commit comments

Comments
 (0)