aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2026-03-08 00:08:26 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2026-03-08 00:08:26 +0100
commit8d9ddcf5a81d707cab8bc30ac42291420772f8b7 (patch)
tree095550ef88eee125f535583f8e61a77b206525d5
parentdb1f4a566ccedcd8bb86ad1136d3e52de73bedb4 (diff)
truncate_file: log fclose() errors
-rw-r--r--FICS/utils.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/FICS/utils.c b/FICS/utils.c
index 599a4ac..71a2ee5 100644
--- a/FICS/utils.c
+++ b/FICS/utils.c
@@ -967,7 +967,8 @@ truncate_file(const char *file, int lines)
}
}
- fclose(fp);
+ if (fclose(fp) != 0)
+ warn("%s: fclose() error", __func__);
if (trunc) {
int fd;
@@ -989,7 +990,8 @@ truncate_file(const char *file, int lines)
bptr = 0;
}
- fclose(fp);
+ if (fclose(fp) != 0)
+ warn("%s: fclose() error", __func__);
}
return 0;