Skip to content

Commit

Permalink
test: remove unnecessary uv_fs_stat() calls
Browse files Browse the repository at this point in the history
`check_utime()` already calls `uv_fs_stat()`, no point in doing it
twice.

PR-URL: libuv#2747
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
bnoordhuis authored and JeffroMF committed May 16, 2022
1 parent 9d3ebe7 commit af3f315
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions test/test-fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2539,11 +2539,7 @@ TEST_IMPL(fs_utime) {
ASSERT(req.result == 0);
uv_fs_req_cleanup(&req);

r = uv_fs_stat(NULL, &req, path, NULL);
ASSERT(r == 0);
ASSERT(req.result == 0);
check_utime(path, atime, mtime, /* test_lutime */ 0);
uv_fs_req_cleanup(&req);

atime = mtime = 1291404900; /* 2010-12-03 20:35:00 - mees <3 */
checkme.path = path;
Expand Down Expand Up @@ -2645,11 +2641,7 @@ TEST_IMPL(fs_futime) {
#endif
uv_fs_req_cleanup(&req);

r = uv_fs_stat(NULL, &req, path, NULL);
ASSERT(r == 0);
ASSERT(req.result == 0);
check_utime(path, atime, mtime, /* test_lutime */ 0);
uv_fs_req_cleanup(&req);

atime = mtime = 1291404900; /* 2010-12-03 20:35:00 - mees <3 */

Expand Down

0 comments on commit af3f315

Please sign in to comment.