Skip to content

Commit

Permalink
lib: named anonymous functions
Browse files Browse the repository at this point in the history
PR-URL: #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>
  • Loading branch information
ccoxwell authored and MylesBorins committed May 8, 2018
1 parent 1b9c40c commit b6de6a7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
});
}
Expand Down Expand Up @@ -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);
});
}
Expand Down

0 comments on commit b6de6a7

Please sign in to comment.