Skip to content

Commit 67a11b9

Browse files
thefourtheyetrevnorris
authored andcommitted
fs: removing unnecessary nullCheckCallNT
`nullCheckCallNT()` function is not necessary, as we can directly pass `callback` and `er` to `process.nextTick()`. PR-URL: #1870 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Trevor Norris <[email protected]>
1 parent 09f2a67 commit 67a11b9

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/fs.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,12 @@ function nullCheck(path, callback) {
9595
er.code = 'ENOENT';
9696
if (typeof callback !== 'function')
9797
throw er;
98-
process.nextTick(nullCheckCallNT, callback, er);
98+
process.nextTick(callback, er);
9999
return false;
100100
}
101101
return true;
102102
}
103103

104-
function nullCheckCallNT(callback, er) {
105-
callback(er);
106-
}
107-
108104
// Static method to set the stats properties on a Stats object.
109105
fs.Stats = function(
110106
dev,

0 commit comments

Comments
 (0)