Skip to content

Commit b6de6a7

Browse files
ccoxwellMylesBorins
authored andcommitted
lib: named anonymous functions
PR-URL: #20408 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Weijia Wang <[email protected]> Reviewed-By: Matheus Marchini <[email protected]>
1 parent 1b9c40c commit b6de6a7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/fs.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ fs.readFile = function(path, options, callback) {
245245
req.oncomplete = readFileAfterOpen;
246246

247247
if (context.isUserFd) {
248-
process.nextTick(function() {
248+
process.nextTick(function tick() {
249249
req.oncomplete(null, path);
250250
});
251251
return;
@@ -302,7 +302,7 @@ ReadFileContext.prototype.close = function(err) {
302302
this.err = err;
303303

304304
if (this.isUserFd) {
305-
process.nextTick(function() {
305+
process.nextTick(function tick() {
306306
req.oncomplete(null);
307307
});
308308
return;
@@ -552,7 +552,7 @@ fs.read = function(fd, buffer, offset, length, position, callback) {
552552
length |= 0;
553553

554554
if (length === 0) {
555-
return process.nextTick(function() {
555+
return process.nextTick(function tick() {
556556
callback && callback(null, 0, buffer);
557557
});
558558
}
@@ -1217,7 +1217,7 @@ function writeAll(fd, isUserFd, buffer, offset, length, position, callback) {
12171217
if (isUserFd) {
12181218
callback(writeErr);
12191219
} else {
1220-
fs.close(fd, function() {
1220+
fs.close(fd, function close() {
12211221
callback(writeErr);
12221222
});
12231223
}

0 commit comments

Comments
 (0)