diff --git a/lib/fs.js b/lib/fs.js index 50913866f9fdfd..07bc060f35e6b8 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -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; @@ -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; @@ -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); }); } @@ -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); }); } diff --git a/lib/util.js b/lib/util.js index 91404d254dc9a4..a47f6305f44895 100644 --- a/lib/util.js +++ b/lib/util.js @@ -276,12 +276,12 @@ function debuglog(set) { if (!debugs[set]) { if (debugEnvRegex.test(set)) { const pid = process.pid; - debugs[set] = function() { + debugs[set] = function debug() { const msg = exports.format.apply(exports, arguments); console.error('%s %d: %s', set, pid, msg); }; } else { - debugs[set] = function() {}; + debugs[set] = function debug() {}; } } return debugs[set];