Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
lib: named anonymous functions
  • Loading branch information
possumwork committed Apr 30, 2018
commit fde40df9dbea6d487d5c5fd1e8e39790aa3a54f2
8 changes: 4 additions & 4 deletions lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
});
}
Expand Down Expand Up @@ -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);
});
}
Expand Down