Skip to content

Commit

Permalink
src: remove redundant snprintf
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
addaleax authored and MylesBorins committed Jul 16, 2020
1 parent 3ee8f53 commit 9c12e53
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/node_dir.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9c12e53

Please sign in to comment.