diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2025-10-04 13:55:04 +0200 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2025-10-04 13:55:04 +0200 |
commit | 7a3fd562cb80da8881a5cebeab0641fcb7b2af30 (patch) | |
tree | 6361222b350e98e2c2c22c5c649c0fcb7b60ec85 /FICS/command.c | |
parent | 85b030a13a3c802c2d8e9d064e7c8665c2a0c54a (diff) |
Refer to the array indices by using enums
Diffstat (limited to 'FICS/command.c')
-rw-r--r-- | FICS/command.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/FICS/command.c b/FICS/command.c index df5d4c2..a69b80f 100644 --- a/FICS/command.c +++ b/FICS/command.c @@ -1311,7 +1311,7 @@ commands_init(void) fp = afp = NULL; snprintf(fname, sizeof fname, "%s/commands", comhelp_dir); - if ((fd[0] = open(fname, g_open_flags[1], g_open_modes)) < 0) { + if ((fd[0] = open(fname, g_open_flags[OPFL_WRITE], g_open_modes)) < 0) { warn("%s: open: %s", __func__, fname); return; } else if ((fp = fdopen(fd[0], "w")) == NULL) { @@ -1323,7 +1323,7 @@ commands_init(void) snprintf(fname, sizeof fname, "%s/admin_commands", adhelp_dir); - if ((fd[1] = open(fname, g_open_flags[1], g_open_modes)) < 0) { + if ((fd[1] = open(fname, g_open_flags[OPFL_WRITE], g_open_modes)) < 0) { warn("%s: open: %s", __func__, fname); goto clean_up; } else if ((afp = fdopen(fd[1], "w")) == NULL) { |