GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fs: fix to not return for void function · nodejs/node@cada22e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • fs.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/fs.js‎

Copy file name to clipboardExpand all lines: lib/fs.js
+13-11Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ function close(fd, callback = defaultCloseCallback) {
534534
function closeSync(fd) {
535535
fd = getValidatedFd(fd);
536536

537-
return binding.close(fd);
537+
binding.close(fd);
538538
}
539539

540540
/**
@@ -784,7 +784,7 @@ function readv(fd, buffers, position, callback) {
784784
if (typeof position !== 'number')
785785
position = null;
786786

787-
return binding.readBuffers(fd, buffers, position, req);
787+
binding.readBuffers(fd, buffers, position, req);
788788
}
789789

790790
ObjectDefineProperty(readv, kCustomPromisifyArgsSymbol,
@@ -860,7 +860,8 @@ function write(fd, buffer, offsetOrOptions, length, position, callback) {
860860

861861
const req = new FSReqCallback();
862862
req.oncomplete = wrapper;
863-
return binding.writeBuffer(fd, buffer, offset, length, position, req);
863+
binding.writeBuffer(fd, buffer, offset, length, position, req);
864+
return;
864865
}
865866

866867
validateStringAfterArrayBufferView(buffer, 'buffer');
@@ -881,7 +882,7 @@ function write(fd, buffer, offsetOrOptions, length, position, callback) {
881882

882883
const req = new FSReqCallback();
883884
req.oncomplete = wrapper;
884-
return binding.writeString(fd, str, offset, length, req);
885+
binding.writeString(fd, str, offset, length, req);
885886
}
886887

887888
ObjectDefineProperty(write, kCustomPromisifyArgsSymbol,
@@ -971,7 +972,7 @@ function writev(fd, buffers, position, callback) {
971972
if (typeof position !== 'number')
972973
position = null;
973974

974-
return binding.writeBuffers(fd, buffers, position, req);
975+
binding.writeBuffers(fd, buffers, position, req);
975976
}
976977

977978
ObjectDefineProperty(writev, kCustomPromisifyArgsSymbol, {
@@ -1177,7 +1178,8 @@ function rmdir(path, options, callback) {
11771178
if (err === false) {
11781179
const req = new FSReqCallback();
11791180
req.oncomplete = callback;
1180-
return binding.rmdir(path, req);
1181+
binding.rmdir(path, req);
1182+
return;
11811183
}
11821184
if (err) {
11831185
return callback(err);
@@ -1190,7 +1192,7 @@ function rmdir(path, options, callback) {
11901192
validateRmdirOptions(options);
11911193
const req = new FSReqCallback();
11921194
req.oncomplete = callback;
1193-
return binding.rmdir(path, req);
1195+
binding.rmdir(path, req);
11941196
}
11951197
}
11961198

@@ -1296,7 +1298,7 @@ function fdatasync(fd, callback) {
12961298
*/
12971299
function fdatasyncSync(fd) {
12981300
fd = getValidatedFd(fd);
1299-
return binding.fdatasync(fd);
1301+
binding.fdatasync(fd);
13001302
}
13011303

13021304
/**
@@ -1321,7 +1323,7 @@ function fsync(fd, callback) {
13211323
*/
13221324
function fsyncSync(fd) {
13231325
fd = getValidatedFd(fd);
1324-
return binding.fsync(fd);
1326+
binding.fsync(fd);
13251327
}
13261328

13271329
/**
@@ -1888,7 +1890,7 @@ function unlink(path, callback) {
18881890
*/
18891891
function unlinkSync(path) {
18901892
path = pathModule.toNamespacedPath(getValidatedPath(path));
1891-
return binding.unlink(path);
1893+
binding.unlink(path);
18921894
}
18931895

18941896
/**
@@ -2929,7 +2931,7 @@ realpath.native = (path, options, callback) => {
29292931
path = getValidatedPath(path);
29302932
const req = new FSReqCallback();
29312933
req.oncomplete = callback;
2932-
return binding.realpath(pathModule.toNamespacedPath(path), options.encoding, req);
2934+
binding.realpath(pathModule.toNamespacedPath(path), options.encoding, req);
29332935
};
29342936

29352937
/**

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.