aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2025-10-17 02:50:15 +0200
committerMarkus Uhlin <markus@nifty-networks.net>2025-10-17 02:50:15 +0200
commit3e3113098225e151732871708fe5549d4b17a7ca (patch)
treeedc89909988aa61c38912e26c25e60bbc06c57bd
parentaa040f42e03472069b68dcb9c3394be1c1179ddf (diff)
Log close() errors
-rw-r--r--FICS/copyfile.c4
1 files changed, 2 insertions, 2 deletions
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__);