aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--FICS/gamedb.c7
1 files 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",