summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/channels.c10
-rw-r--r--src/chanserv.c24
-rw-r--r--src/config.c4
3 files changed, 19 insertions, 19 deletions
diff --git a/src/channels.c b/src/channels.c
index cac56d479..1d4359376 100644
--- a/src/channels.c
+++ b/src/channels.c
@@ -1524,7 +1524,7 @@ void chan_adduser2(User * user, Channel * c)
{
struct c_userlist *u;
- u = scalloc(sizeof(struct c_userlist), 1);
+ u = (struct c_userlist *)scalloc(sizeof(struct c_userlist), 1);
u->next = c->users;
if (c->users)
c->users->prev = u;
@@ -1589,7 +1589,7 @@ Channel *chan_create(char *chan, time_t ts)
if (debug)
alog("debug: Creating channel %s", chan);
/* Allocate pre-cleared memory */
- c = scalloc(sizeof(Channel), 1);
+ c = (Channel *)scalloc(sizeof(Channel), 1);
strscpy(c->name, chan, sizeof(c->name));
list = &chanlist[HASH(c->name)];
c->next = *list;
@@ -1798,7 +1798,7 @@ Channel *join_user_update(User * user, Channel * chan, char *name,
if (debug)
alog("debug: %s joins %s", user->nick, chan->name);
- c = scalloc(sizeof(*c), 1);
+ c = (u_chanlist *)scalloc(sizeof(*c), 1);
c->next = user->chans;
if (user->chans)
user->chans->prev = c;
@@ -1916,7 +1916,7 @@ Entry *entry_create(char *mask)
int do_free;
uint32 ip, cidr;
- entry = scalloc(1, sizeof(Entry));
+ entry = (Entry *)scalloc(1, sizeof(Entry));
entry->type = ENTRYTYPE_NONE;
entry->prev = NULL;
entry->next = NULL;
@@ -2073,7 +2073,7 @@ EList *list_create()
{
EList *list;
- list = scalloc(1, sizeof(EList));
+ list = (EList *)scalloc(1, sizeof(EList));
list->entries = NULL;
list->count = 0;
diff --git a/src/chanserv.c b/src/chanserv.c
index 8dd72130c..3881c29d7 100644
--- a/src/chanserv.c
+++ b/src/chanserv.c
@@ -441,7 +441,7 @@ void load_cs_dbase(void)
while ((c = getc_db(f)) != 0) {
if (c != 1)
fatal("Invalid format in %s", ChanDBName);
- ci = scalloc(sizeof(ChannelInfo), 1);
+ ci = (ChannelInfo *)scalloc(sizeof(ChannelInfo), 1);
*last = ci;
last = &ci->next;
ci->prev = prev;
@@ -515,7 +515,7 @@ void load_cs_dbase(void)
ci->bantype = tmp16;
SAFE(read_int16(&tmp16, f));
n_levels = tmp16;
- ci->levels = scalloc(2 * CA_SIZE, 1);
+ ci->levels = (int16 *)scalloc(2 * CA_SIZE, 1);
reset_levels(ci);
for (j = 0; j < n_levels; j++) {
SAFE(read_int16(&tmp16, f));
@@ -547,7 +547,7 @@ void load_cs_dbase(void)
SAFE(read_int16(&ci->accesscount, f));
if (ci->accesscount) {
- ci->access = scalloc(ci->accesscount, sizeof(ChanAccess));
+ ci->access = (ChanAccess *)scalloc(ci->accesscount, sizeof(ChanAccess));
for (j = 0; j < ci->accesscount; j++) {
SAFE(read_int16(&ci->access[j].in_use, f));
if (ci->access[j].in_use) {
@@ -582,7 +582,7 @@ void load_cs_dbase(void)
SAFE(read_int16(&ci->akickcount, f));
if (ci->akickcount) {
- ci->akick = scalloc(ci->akickcount, sizeof(AutoKick));
+ ci->akick = (AutoKick *)scalloc(ci->akickcount, sizeof(AutoKick));
for (j = 0; j < ci->akickcount; j++) {
if (ver >= 15) {
SAFE(read_int16(&ci->akick[j].flags, f));
@@ -683,7 +683,7 @@ void load_cs_dbase(void)
ci->memos.memomax = (int16) tmp16;
if (ci->memos.memocount) {
Memo *memos;
- memos = scalloc(sizeof(Memo) * ci->memos.memocount, 1);
+ memos = (Memo *)scalloc(sizeof(Memo) * ci->memos.memocount, 1);
ci->memos.memos = memos;
for (j = 0; j < ci->memos.memocount; j++, memos++) {
SAFE(read_int32(&memos->number, f));
@@ -726,7 +726,7 @@ void load_cs_dbase(void)
ci->botflags = tmp32;
SAFE(read_int16(&tmp16, f));
n_ttb = tmp16;
- ci->ttb = scalloc(2 * TTB_SIZE, 1);
+ ci->ttb = (int16 *)scalloc(2 * TTB_SIZE, 1);
for (j = 0; j < n_ttb; j++) {
SAFE(read_int16(&tmp16, f));
if (j < TTB_SIZE)
@@ -747,7 +747,7 @@ void load_cs_dbase(void)
SAFE(read_int16(&ci->bwcount, f));
if (ci->bwcount) {
- ci->badwords = scalloc(ci->bwcount, sizeof(BadWord));
+ ci->badwords = (BadWord *)scalloc(ci->bwcount, sizeof(BadWord));
for (j = 0; j < ci->bwcount; j++) {
SAFE(read_int16(&ci->badwords[j].in_use, f));
if (ci->badwords[j].in_use) {
@@ -761,7 +761,7 @@ void load_cs_dbase(void)
} else {
ci->bi = NULL;
ci->botflags = 0;
- ci->ttb = scalloc(2 * TTB_SIZE, 1);
+ ci->ttb = (int16 *)scalloc(2 * TTB_SIZE, 1);
for (j = 0; j < TTB_SIZE; j++)
ci->ttb[j] = 0;
ci->bwcount = 0;
@@ -1471,7 +1471,7 @@ int check_should_protect(User * user, char *chan)
static void timeout_leave(Timeout * to)
{
- char *chan = to->data;
+ const char *chan = (const char *)to->data;
ChannelInfo *ci = cs_findchan(chan);
if (ci) /* Check cos the channel may be dropped in the meantime */
@@ -1986,11 +1986,11 @@ ChannelInfo *makechan(const char *chan)
int i;
ChannelInfo *ci;
- ci = scalloc(sizeof(ChannelInfo), 1);
+ ci = (ChannelInfo *)scalloc(sizeof(ChannelInfo), 1);
strscpy(ci->name, chan, CHANMAX);
ci->time_registered = time(NULL);
reset_levels(ci);
- ci->ttb = scalloc(2 * TTB_SIZE, 1);
+ ci->ttb = (int16 *)scalloc(2 * TTB_SIZE, 1);
for (i = 0; i < TTB_SIZE; i++)
ci->ttb[i] = 0;
alpha_insert_chan(ci);
@@ -2181,7 +2181,7 @@ void reset_levels(ChannelInfo * ci)
if (ci->levels)
free(ci->levels);
- ci->levels = scalloc(CA_SIZE * sizeof(*ci->levels), 1);
+ ci->levels = (int16 *)scalloc(CA_SIZE * sizeof(*ci->levels), 1);
for (i = 0; def_levels[i][0] >= 0; i++)
ci->levels[def_levels[i][0]] = def_levels[i][1];
}
diff --git a/src/config.c b/src/config.c
index b4ff90b28..49d3897ec 100644
--- a/src/config.c
+++ b/src/config.c
@@ -1245,7 +1245,7 @@ int read_config(int reload)
if (s) {
RootNumber++;
ServicesRoots =
- realloc(ServicesRoots, sizeof(char *) * RootNumber);
+ (char **)realloc(ServicesRoots, sizeof(char *) * RootNumber);
ServicesRoots[RootNumber - 1] = sstrdup(s);
}
} while ((s = strtok(NULL, " ")));
@@ -1265,7 +1265,7 @@ int read_config(int reload)
do {
if (s) {
NumUlines++;
- Ulines = realloc(Ulines, sizeof(char *) * NumUlines);
+ Ulines = (char **)realloc(Ulines, sizeof(char *) * NumUlines);
Ulines[NumUlines - 1] = sstrdup(s);
}
} while ((s = strtok(NULL, " ")));