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 <cjihrig@gmail.com>
  • Loading branch information
bnoordhuis authored and vtjnash committed Nov 18, 2020
1 parent fc2c1a2 commit e846c3b
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 e846c3b

Please sign in to comment.