summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@irssi.org>2009-02-21 17:55:12 +0000
committerjilles <jilles@dbcabf3a-b0e7-0310-adc4-f8d773084564>2009-02-21 17:55:12 +0000
commit946e7784b00c9051013b996bd09dcaf144cf250c (patch)
treeade140ae0b69f41c213721ebdef58a98195176b6 /src
parent145f566f19fa6f02fc65aeea366fd15f5ec01de1 (diff)
downloadirssi-946e7784b00c9051013b996bd09dcaf144cf250c.zip
Make explicit how long the arrays for prefix_add and prefix_del are.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5020 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/irc/core/modes.c4
-rw-r--r--src/irc/core/modes.h5
2 files changed, 5 insertions, 4 deletions
diff --git a/src/irc/core/modes.c b/src/irc/core/modes.c
index f204c801..3b1e7d21 100644
--- a/src/irc/core/modes.c
+++ b/src/irc/core/modes.c
@@ -59,7 +59,7 @@ static void nick_mode_change(IRC_CHANNEL_REC *channel, const char *nick,
channel, nickrec, setby, modestr, typestr);
}
-void prefix_add(char *prefixes, char newprefix, SERVER_REC *server)
+void prefix_add(char prefixes[MAX_USER_PREFIXES+1], char newprefix, SERVER_REC *server)
{
const char *prefixlst;
char newprefixes[MAX_USER_PREFIXES+1]; /* to hold the new prefixes */
@@ -101,7 +101,7 @@ void prefix_add(char *prefixes, char newprefix, SERVER_REC *server)
strcpy(prefixes, newprefixes);
}
-void prefix_del(char *prefixes, char oldprefix)
+void prefix_del(char prefixes[MAX_USER_PREFIXES+1], char oldprefix)
{
char *todel;
diff --git a/src/irc/core/modes.h b/src/irc/core/modes.h
index e9326c7a..bef017ba 100644
--- a/src/irc/core/modes.h
+++ b/src/irc/core/modes.h
@@ -2,6 +2,7 @@
#define __MODES_H
#include "irc-channels.h"
+#include "nicklist.h" /* MAX_USER_PREFIXES */
typedef void mode_func_t(IRC_CHANNEL_REC *, const char *, char, char,
char *, GString *);
@@ -54,8 +55,8 @@ void channel_set_singlemode(IRC_CHANNEL_REC *channel, const char *nicks,
void channel_set_mode(IRC_SERVER_REC *server, const char *channel,
const char *mode);
-void prefix_add(char *prefixes, char newprefix, SERVER_REC *server);
-void prefix_del(char *prefixes, char oldprefix);
+void prefix_add(char prefixes[MAX_USER_PREFIXES+1], char newprefix, SERVER_REC *server);
+void prefix_del(char prefixes[MAX_USER_PREFIXES+1], char oldprefix);
mode_func_t modes_type_a;
mode_func_t modes_type_b;