mirror of https://github.com/nodejs/node.git
fs: removing unnecessary nullCheckCallNT
`nullCheckCallNT()` function is not necessary, as we can directly pass `callback` and `er` to `process.nextTick()`. PR-URL: https://github.com/nodejs/io.js/pull/1870 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Trevor Norris <trev.norris@gmail.com>pull/1890/merge
parent
09f2a67bd8
commit
67a11b9bcc
|
@ -95,16 +95,12 @@ function nullCheck(path, callback) {
|
||||||
er.code = 'ENOENT';
|
er.code = 'ENOENT';
|
||||||
if (typeof callback !== 'function')
|
if (typeof callback !== 'function')
|
||||||
throw er;
|
throw er;
|
||||||
process.nextTick(nullCheckCallNT, callback, er);
|
process.nextTick(callback, er);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function nullCheckCallNT(callback, er) {
|
|
||||||
callback(er);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Static method to set the stats properties on a Stats object.
|
// Static method to set the stats properties on a Stats object.
|
||||||
fs.Stats = function(
|
fs.Stats = function(
|
||||||
dev,
|
dev,
|
||||||
|
|
Loading…
Reference in New Issue