From b6de6a7e35669b30997cd033e19950ee15b3c55b Mon Sep 17 00:00:00 2001 From: Carrie Coxwell Date: Mon, 30 Apr 2018 02:08:20 -0500 Subject: [PATCH] lib: named anonymous functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/20408 Reviewed-By: Michaƫl Zasso Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Weijia Wang Reviewed-By: Matheus Marchini --- lib/fs.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/fs.js b/lib/fs.js index 2d41f17e8d1de5..1bcb58a9124f96 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -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); }); }