From 7a3fd562cb80da8881a5cebeab0641fcb7b2af30 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Sat, 4 Oct 2025 13:55:04 +0200 Subject: Refer to the array indices by using enums --- FICS/makerank.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'FICS/makerank.c') diff --git a/FICS/makerank.c b/FICS/makerank.c index 076e16e..aa92ae0 100644 --- a/FICS/makerank.c +++ b/FICS/makerank.c @@ -315,7 +315,8 @@ makerank(void) snprintf(fName, sizeof fName, "%s/rank.%s", DEFAULT_STATS, rnames[rtype]); - if ((fd = open(fName, g_open_flags[1], g_open_modes)) < 0 || + if ((fd = open(fName, g_open_flags[OPFL_WRITE], + g_open_modes)) < 0 || (fp = fdopen(fd, "w")) == NULL) err(1, "%s: rank file open error", __func__); -- cgit v1.2.3