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 authored and Myles Borins committed 2018-05-08 14:22:25 -07:00
1 parent 1b9c40cc71
commit b6de6a7e35
1 file changed
+4 -4
+4 -4
View File
@@ -245,7 +245,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;
@@ -302,7 +302,7 @@ ReadFileContext.prototype.close = function(err) {
this.err = err;
if (this.isUserFd) {
process.nextTick(function() {
process.nextTick(function tick() {
req.oncomplete(null);
});
return;
@@ -552,7 +552,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);
});
}
@@ -1217,7 +1217,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);
});
}