summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/extern.h18
-rw-r--r--src/process.c6
-rw-r--r--src/send.c2
-rw-r--r--src/servers.c2
-rw-r--r--src/sessions.c12
-rw-r--r--src/slist.c2
-rw-r--r--src/timeout.c2
-rw-r--r--src/users.c12
8 files changed, 28 insertions, 28 deletions
diff --git a/include/extern.h b/include/extern.h
index 74a90a768..e7fa8f138 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -1029,9 +1029,9 @@ E void notice_server(char *source, Server * s, char *fmt, ...)
E void notice_user(char *source, User *u, const char *fmt, ...)
FORMAT(printf,3,4);
-E void notice_list(char *source, char *dest, char **text);
-E void notice_lang(char *source, User *dest, int message, ...);
-E void notice_help(char *source, User *dest, int message, ...);
+E void notice_list(const char *source, const char *dest, char **text);
+E void notice_lang(const char *source, User *dest, int message, ...);
+E void notice_help(const char *source, User *dest, int message, ...);
/**** servers.c ****/
@@ -1251,16 +1251,16 @@ E void anope_cmd_nick(char *nick, char *name, char *mode); /* NICK */
E void anope_cmd_chg_nick(char *oldnick, char *newnick); /* NICK */
E void anope_cmd_bot_nick(char *nick, char *user,char *host,char *real,char *modes); /* NICK */
E void anope_cmd_guest_nick(char *nick, char *user,char *host,char *real,char *modes); /* NICK */
-E void anope_cmd_notice(char *source, char *dest, const char *fmt, ...); /* NOTICE */
-E void anope_cmd_notice_ops(char *source, char *dest, const char *fmt, ...); /* NOTICE */
-E void anope_cmd_notice2(char *source, char *dest, char *msg); /* NOTICE */
+E void anope_cmd_notice(const char *source, const char *dest, const char *fmt, ...); /* NOTICE */
+E void anope_cmd_notice_ops(const char *source, const char *dest, const char *fmt, ...); /* NOTICE */
+E void anope_cmd_notice2(const char *source, const char *dest, const char *msg); /* NOTICE */
E void anope_cmd_serv_notice(char *source, char *dest, char *msg); /* NOTICE */
E void anope_cmd_part(const char *nick, const char *chan, const char *fmt, ...); /* PART */
E void anope_cmd_pass(char *pass); /* PASS */
E void anope_cmd_pong(char *servname, char *who); /* PONG */
-E void anope_cmd_privmsg(char *source, char *dest, const char *fmt, ...); /* PRIVMSG */
-E void anope_cmd_action(char *source, char *dest, const char *fmt, ...); /* PRIVMSG */
-E void anope_cmd_privmsg2(char *source, char *dest, char *msg); /* PRIVMSG */
+E void anope_cmd_privmsg(const char *source, const char *dest, const char *fmt, ...); /* PRIVMSG */
+E void anope_cmd_action(const char *source, const char *dest, const char *fmt, ...); /* PRIVMSG */
+E void anope_cmd_privmsg2(const char *source, const char *dest, const char *msg); /* PRIVMSG */
E void anope_cmd_serv_privmsg(char *source, char *dest, char *msg); /* PRIVMSG */
E void anope_cmd_protoctl(); /* PROTOCTL */
E void anope_cmd_quit(char *source, const char *fmt, ...); /* QUIT */
diff --git a/src/process.c b/src/process.c
index 627c94f04..b6948e80f 100644
--- a/src/process.c
+++ b/src/process.c
@@ -74,7 +74,7 @@ void add_ignore(const char *nick, time_t delta)
/* Create new entry.. */
} else {
- ign = scalloc(sizeof(*ign), 1);
+ ign = (IgnoreData *)scalloc(sizeof(*ign), 1);
ign->mask = mask;
ign->time = now + delta;
ign->prev = NULL;
@@ -263,12 +263,12 @@ int split_buf(char *buf, char ***argv, int colon_special)
int argc;
char *s;
- *argv = scalloc(sizeof(char *) * argvsize, 1);
+ *argv = (char **)scalloc(sizeof(char *) * argvsize, 1);
argc = 0;
while (*buf) {
if (argc == argvsize) {
argvsize += 8;
- *argv = srealloc(*argv, sizeof(char *) * argvsize);
+ *argv = (char **)srealloc(*argv, sizeof(char *) * argvsize);
}
if (*buf == ':') {
(*argv)[argc++] = buf + 1;
diff --git a/src/send.c b/src/send.c
index 6d57a9823..8a827a1db 100644
--- a/src/send.c
+++ b/src/send.c
@@ -167,7 +167,7 @@ void notice_list(char *source, char *dest, char **text)
* @param ... any number of parameters
* @return void
*/
-void notice_lang(char *source, User * dest, int message, ...)
+void notice_lang(const char *source, User * dest, int message, ...)
{
va_list args;
char buf[4096]; /* because messages can be really big */
diff --git a/src/servers.c b/src/servers.c
index dc87826ce..b2a94247a 100644
--- a/src/servers.c
+++ b/src/servers.c
@@ -122,7 +122,7 @@ Server *new_server(Server * uplink, const char *name, const char *desc,
{
Server *serv;
- serv = scalloc(sizeof(Server), 1);
+ serv = (Server *)scalloc(sizeof(Server), 1);
if (!name)
name = "";
serv->name = sstrdup(name);
diff --git a/src/sessions.c b/src/sessions.c
index 05e90a76d..96b8f2047 100644
--- a/src/sessions.c
+++ b/src/sessions.c
@@ -251,7 +251,7 @@ int add_session(char *nick, char *host, char *hostip)
}
nsessions++;
- session = scalloc(sizeof(Session), 1);
+ session = (Session *)scalloc(sizeof(Session), 1);
session->host = sstrdup(host);
list = &sessionlist[HASH(session->host)];
session->next = *list;
@@ -343,7 +343,7 @@ void expire_exceptions(void)
nexceptions--;
memmove(exceptions + i, exceptions + i + 1,
sizeof(Exception) * (nexceptions - i));
- exceptions = srealloc(exceptions, sizeof(Exception) * nexceptions);
+ exceptions = (Exception *)srealloc(exceptions, sizeof(Exception) * nexceptions);
i--;
}
}
@@ -409,7 +409,7 @@ void load_exceptions()
case 7:
SAFE(read_int16(&n, f));
nexceptions = n;
- exceptions = scalloc(sizeof(Exception) * nexceptions, 1);
+ exceptions = (Exception *)scalloc(sizeof(Exception) * nexceptions, 1);
if (!nexceptions) {
close_db(f);
return;
@@ -532,7 +532,7 @@ int exception_add(User * u, const char *mask, const int limit,
}
nexceptions++;
- exceptions = srealloc(exceptions, sizeof(Exception) * nexceptions);
+ exceptions = (Exception *)srealloc(exceptions, sizeof(Exception) * nexceptions);
exceptions[nexceptions - 1].mask = sstrdup(mask);
exceptions[nexceptions - 1].limit = limit;
@@ -557,7 +557,7 @@ static int exception_del(const int index)
nexceptions--;
memmove(exceptions + index, exceptions + index + 1,
sizeof(Exception) * (nexceptions - index));
- exceptions = srealloc(exceptions, sizeof(Exception) * nexceptions);
+ exceptions = (Exception *)srealloc(exceptions, sizeof(Exception) * nexceptions);
return 1;
}
@@ -802,7 +802,7 @@ int do_exception(User * u)
if ((n1 >= 0 && n1 < nexceptions) && (n2 >= 0 && n2 < nexceptions)
&& (n1 != n2)) {
- exception = scalloc(sizeof(Exception), 1);
+ exception = (Exception *)scalloc(sizeof(Exception), 1);
memcpy(exception, &exceptions[n1], sizeof(Exception));
if (n1 < n2) {
diff --git a/src/slist.c b/src/slist.c
index 099a59328..30de938e4 100644
--- a/src/slist.c
+++ b/src/slist.c
@@ -384,7 +384,7 @@ int slist_setcapacity(SList * slist, int16 capacity)
slist->capacity = capacity;
if (slist->capacity)
slist->list =
- srealloc(slist->list, sizeof(void *) * slist->capacity);
+ (void **)srealloc(slist->list, sizeof(void *) * slist->capacity);
else {
free(slist->list);
slist->list = NULL;
diff --git a/src/timeout.c b/src/timeout.c
index 1db734654..263d3e6e0 100644
--- a/src/timeout.c
+++ b/src/timeout.c
@@ -93,7 +93,7 @@ void check_timeouts(void)
Timeout *add_timeout(int delay, void (*code) (Timeout *), int repeat)
{
- Timeout *t = scalloc(sizeof(Timeout), 1);
+ Timeout *t = (Timeout *)scalloc(sizeof(Timeout), 1);
t->settime = time(NULL);
t->timeout = t->settime + delay;
t->code = code;
diff --git a/src/users.c b/src/users.c
index 44faaf9d5..cf794ceca 100644
--- a/src/users.c
+++ b/src/users.c
@@ -35,7 +35,7 @@ static User *new_user(const char *nick)
{
User *user, **list;
- user = scalloc(sizeof(User), 1);
+ user = (User *)scalloc(sizeof(User), 1);
if (!nick)
nick = "";
strscpy(user->nick, nick, NICKMAX);
@@ -111,7 +111,7 @@ void update_host(User * user)
free(user->na->last_usermask);
user->na->last_usermask =
- smalloc(strlen(common_get_vident(user)) +
+ (char *)smalloc(strlen(common_get_vident(user)) +
strlen(common_get_vhost(user)) + 2);
sprintf(user->na->last_usermask, "%s@%s", common_get_vident(user),
common_get_vhost(user));
@@ -180,7 +180,7 @@ void change_user_username(User * user, const char *username)
free(user->na->last_usermask);
user->na->last_usermask =
- smalloc(strlen(common_get_vident(user)) +
+ (char *)smalloc(strlen(common_get_vident(user)) +
strlen(common_get_vhost(user)) + 2);
sprintf(user->na->last_usermask, "%s@%s", common_get_vident(user),
common_get_vhost(user));
@@ -435,7 +435,7 @@ Uid *new_uid(const char *nick, char *uid)
{
Uid *u, **list;
- u = scalloc(sizeof(Uid), 1);
+ u = (Uid *)scalloc(sizeof(Uid), 1);
if (!nick || !uid) {
return NULL;
}
@@ -750,7 +750,7 @@ User *do_nick(const char *source, char *nick, char *username, char *host,
if (user->na->last_usermask)
free(user->na->last_usermask);
user->na->last_usermask =
- smalloc(strlen(common_get_vident(user)) +
+ (char *)smalloc(strlen(common_get_vident(user)) +
strlen(common_get_vhost(user)) + 2);
sprintf(user->na->last_usermask, "%s@%s",
common_get_vident(user), common_get_vhost(user));
@@ -1089,7 +1089,7 @@ char *create_mask(User * u)
* will never be longer than this (and will often be shorter), thus we
* can use strcpy() and sprintf() safely.
*/
- end = mask = smalloc(ulen + strlen(common_get_vhost(u)) + 3);
+ end = mask = (char *)smalloc(ulen + strlen(common_get_vhost(u)) + 3);
end += sprintf(end, "%s%s@",
(ulen <
(*(common_get_vident(u)) ==