aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
Diffstat (limited to 'FICS')
-rw-r--r--FICS/utils.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/FICS/utils.c b/FICS/utils.c
index 71a2ee5..a04ecb6 100644
--- a/FICS/utils.c
+++ b/FICS/utils.c
@@ -979,7 +979,10 @@ truncate_file(const char *file, int lines)
return -1;
} else if ((fp = fdopen(fd, "w")) == NULL) {
warn("%s: fdopen", __func__);
- close(fd);
+
+ if (close(fd) != 0)
+ warn("%s: close() error", __func__);
+
return -1;
}