From 43b9a36537cb5f4515e4ba287ecd5f2f97704f8a Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Mon, 27 Apr 2026 23:04:27 +0200 Subject: game_write_complete: moved call to close() --- FICS/gamedb.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/FICS/gamedb.c b/FICS/gamedb.c index 30e15e4..884da2e 100644 --- a/FICS/gamedb.c +++ b/FICS/gamedb.c @@ -2295,10 +2295,11 @@ game_write_complete(int g, int isDraw, char *EndSymbol) (void) fprintf(stderr, "Trouble writing history file " "%s\n", fname); + if (close(fd) != 0) { + warn("%s: error closing file descriptor", + __func__); + } } - - if (close(fd) != 0) - warn("%s: error closing file descriptor", __func__); } msnprintf(fname, sizeof fname, "%s/player_data/%c/%s.%s", -- cgit v1.2.3