diff options
Diffstat (limited to 'FICS/utils.c')
| -rw-r--r-- | FICS/utils.c | 5 |
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; } |
