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/lists.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'FICS/lists.c') diff --git a/FICS/lists.c b/FICS/lists.c index c11d75b..97ee525 100644 --- a/FICS/lists.c +++ b/FICS/lists.c @@ -435,7 +435,8 @@ list_addsub(int p, char *list, char *who, int addsub) msnprintf(filename, sizeof filename, "%s/%s", lists_dir, listname); - if ((fd = open(filename, g_open_flags[1], g_open_modes)) < 0) { + if ((fd = open(filename, g_open_flags[OPFL_WRITE], + g_open_modes)) < 0) { fprintf(stderr, "Couldn't save %s list.\n", listname); } else if ((fp = fdopen(fd, "w")) == NULL) { fprintf(stderr, "Couldn't save %s list.\n", listname); -- cgit v1.2.3