Skip to content

Commit

Permalink
fs: removing unnecessary nullCheckCallNT
Browse files Browse the repository at this point in the history
`nullCheckCallNT()` function is not necessary, as we can directly pass
`callback` and `er` to `process.nextTick()`.

PR-URL: nodejs#1870
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
  • Loading branch information
thefourtheye authored and trevnorris committed Jun 10, 2015
1 parent 09f2a67 commit 67a11b9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,12 @@ function nullCheck(path, callback) {
er.code = 'ENOENT';
if (typeof callback !== 'function')
throw er;
process.nextTick(nullCheckCallNT, callback, er);
process.nextTick(callback, er);
return false;
}
return true;
}

function nullCheckCallNT(callback, er) {
callback(er);
}

// Static method to set the stats properties on a Stats object.
fs.Stats = function(
dev,
Expand Down

0 comments on commit 67a11b9

Please sign in to comment.