diff options
| author | Markus Uhlin <markus@nifty-networks.net> | 2026-03-08 00:09:17 +0100 |
|---|---|---|
| committer | Markus Uhlin <markus@nifty-networks.net> | 2026-03-08 00:09:17 +0100 |
| commit | e5f6f4dda3b3dd8b44d9eedeff41eedea84393db (patch) | |
| tree | 6a592146b64792c099e0ec8a2f59942111ce4fc5 /FICS | |
| parent | 8d9ddcf5a81d707cab8bc30ac42291420772f8b7 (diff) | |
truncate_file: log close() error
Diffstat (limited to 'FICS')
| -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; } |
