From 3e3113098225e151732871708fe5549d4b17a7ca Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Fri, 17 Oct 2025 02:50:15 +0200 Subject: Log close() errors --- FICS/copyfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'FICS') diff --git a/FICS/copyfile.c b/FICS/copyfile.c index 84836fe..208f2e2 100644 --- a/FICS/copyfile.c +++ b/FICS/copyfile.c @@ -52,8 +52,8 @@ fics_copyfile(const char *p1, const char *p2) total_written += ret[1]; } - close(fd[0]); - close(fd[1]); + if (close(fd[0]) != 0 || close(fd[1]) != 0) + perror("close"); if (total_read != total_written) { warnx("%s: total written mismatch total read", __func__); -- cgit v1.2.3