diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2023-01-31 12:16:41 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2023-01-31 12:16:52 -0500 |
commit | 88525617e977b2b24315e8a7bc565c2975cdf345 (patch) | |
tree | 795dc1fd4a63ac41f96720c666edbe6da6a9270d /tests/xtouch.c | |
parent | 52537ad1cb46450f0b4eed090f5adfa9cbaeeb02 (diff) | |
download | bfs-88525617e977b2b24315e8a7bc565c2975cdf345.tar.xz |
tests: Use close() wrappers
Diffstat (limited to 'tests/xtouch.c')
-rw-r--r-- | tests/xtouch.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/xtouch.c b/tests/xtouch.c index 506c73d..7e29547 100644 --- a/tests/xtouch.c +++ b/tests/xtouch.c @@ -104,13 +104,11 @@ static int xtouch(const struct args *args, const char *path) { } if (futimens(fd, args->times) != 0) { - int error = errno; - close(fd); - errno = error; + close_quietly(fd); return -1; } - return close(fd); + return xclose(fd); } } |