aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-07-07 01:51:51 +0200
committerMarkus Uhlin <markus@nifty-networks.net>2024-07-07 01:51:51 +0200
commit4f46b519492cf690dc8a4ca5f40a8ba03cc13b32 (patch)
tree55b42b002aca34b42c9be650ff5b9a07001f404b
parente7477b47392fc685ea28357bbc478fa94119500d (diff)
Added usage of ARRAY_SIZE()
-rw-r--r--FICS/playerdb.c2
-rw-r--r--FICS/talkproc.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/FICS/playerdb.c b/FICS/playerdb.c
index 91eb43d..00c409c 100644
--- a/FICS/playerdb.c
+++ b/FICS/playerdb.c
@@ -2723,7 +2723,7 @@ player_search(int p, char *name)
// Exact match with registered player?
snprintf(pdir, sizeof pdir, "%s/%c", player_dir, name[0]);
- count = search_directory(pdir, name, buffer, 1000);
+ count = search_directory(pdir, name, buffer, ARRAY_SIZE(buffer));
if (count > 0 && !strcmp(name, *buffer))
goto ReadPlayerFromFile; // Found an unconnected
diff --git a/FICS/talkproc.c b/FICS/talkproc.c
index 275ac3b..85da66d 100644
--- a/FICS/talkproc.c
+++ b/FICS/talkproc.c
@@ -887,7 +887,7 @@ com_mailmess(int p, param_list param)
snprintf(mdir, sizeof mdir, "%s/player_data/%c/", stats_dir,
parray[p].login[0]);
- if (search_directory(mdir, filename, buffer, 1000)) {
+ if (search_directory(mdir, filename, buffer, ARRAY_SIZE(buffer))) {
snprintf(subj, sizeof subj, "Your FICS messages from server %s",
fics_hostname);