We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 402867c commit 902ba0eCopy full SHA for 902ba0e
src/module_wrap.cc
@@ -433,16 +433,15 @@ std::string ReadFile(uv_file file) {
433
uv_fs_t req;
434
char buffer_memory[4096];
435
uv_buf_t buf = uv_buf_init(buffer_memory, sizeof(buffer_memory));
436
- int r;
437
438
do {
439
- r = uv_fs_read(uv_default_loop(),
440
- &req,
441
- file,
442
- &buf,
443
- 1,
444
- contents.length(), // offset
445
- nullptr);
+ const int r = uv_fs_read(uv_default_loop(),
+ &req,
+ file,
+ &buf,
+ 1,
+ contents.length(), // offset
+ nullptr);
446
uv_fs_req_cleanup(&req);
447
448
if (r <= 0)
0 commit comments