From a079039934311f64a48e1010a97492a22126042e Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Mon, 8 Feb 2021 03:08:26 -0600 Subject: Have xclose() perform the fd != -1 test. --- toys/other/hwclock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toys/other/hwclock.c') diff --git a/toys/other/hwclock.c b/toys/other/hwclock.c index a6db923a..541c70a3 100644 --- a/toys/other/hwclock.c +++ b/toys/other/hwclock.c @@ -84,5 +84,5 @@ void hwclock_main() if (settimeofday(&timeval, &tzone)) perror_exit("settimeofday failed"); } - if (fd != -1) close(fd); + xclose(fd); } -- cgit v1.2.3