lib: named anonymous functions

PR-URL: https://github.com/nodejs/node/pull/20408
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
This commit is contained in:
Carrie Coxwell 2018-04-30 02:08:20 -05:00 committed by Matheus Marchini
parent 4d8806fc40
commit 0930d7ec05
No known key found for this signature in database
GPG Key ID: BE516BA4874DB4D9

View File

@ -247,7 +247,7 @@ fs.readFile = function(path, options, callback) {
req.oncomplete = readFileAfterOpen;
if (context.isUserFd) {
process.nextTick(function() {
process.nextTick(function tick() {
req.oncomplete(null, path);
});
return;
@ -304,7 +304,7 @@ ReadFileContext.prototype.close = function(err) {
this.err = err;
if (this.isUserFd) {
process.nextTick(function() {
process.nextTick(function tick() {
req.oncomplete(null);
});
return;
@ -554,7 +554,7 @@ fs.read = function(fd, buffer, offset, length, position, callback) {
length |= 0;
if (length === 0) {
return process.nextTick(function() {
return process.nextTick(function tick() {
callback && callback(null, 0, buffer);
});
}
@ -1219,7 +1219,7 @@ function writeAll(fd, isUserFd, buffer, offset, length, position, callback) {
if (isUserFd) {
callback(writeErr);
} else {
fs.close(fd, function() {
fs.close(fd, function close() {
callback(writeErr);
});
}