mirror of
https://github.com/anope/anope.git
synced 2026-07-03 02:43:13 +02:00
Fix for g++
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1176 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
+9
-9
@@ -354,8 +354,7 @@ void sighandler(int signum)
|
||||
save_databases();
|
||||
|
||||
if (!read_config(1)) {
|
||||
sprintf(quitmsg,
|
||||
"Error Reading Configuration File (Received SIGUSR2)");
|
||||
quitmsg = "Error Reading Configuration File (Received SIGUSR2)";
|
||||
quitting = 1;
|
||||
}
|
||||
send_event(EVENT_RELOAD, 1, EVENT_START);
|
||||
@@ -480,15 +479,15 @@ void sighandler(int signum)
|
||||
#ifndef _WIN32
|
||||
signum == SIGUSR1 ||
|
||||
#endif
|
||||
!(quitmsg = calloc(BUFSIZE, 1))) {
|
||||
!(quitmsg = (const char *)calloc(BUFSIZE, 1))) {
|
||||
quitmsg = "Out of memory!";
|
||||
} else {
|
||||
|
||||
// Yes, this isn't the "nicest" of ideas, but we know it's safe, if bad practice. -- w00t
|
||||
#if HAVE_STRSIGNAL
|
||||
snprintf(quitmsg, BUFSIZE, "Services terminating: %s",
|
||||
strsignal(signum));
|
||||
snprintf((char *)quitmsg, BUFSIZE, "Services terminating: %s", strsignal(signum));
|
||||
#else
|
||||
snprintf(quitmsg, BUFSIZE, "Services terminating on signal %d",
|
||||
signum);
|
||||
snprintf((char *)quitmsg, BUFSIZE, "Services terminating on signal %d", signum);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -656,9 +655,10 @@ int main(int ac, char **av, char **envp)
|
||||
process();
|
||||
} else if (i == 0) {
|
||||
int errno_save = errno;
|
||||
quitmsg = scalloc(BUFSIZE, 1);
|
||||
quitmsg = (const char *)scalloc(BUFSIZE, 1);
|
||||
if (quitmsg) {
|
||||
snprintf(quitmsg, BUFSIZE,
|
||||
// Naughty, but oh well. :)
|
||||
snprintf((char *)quitmsg, BUFSIZE,
|
||||
"Read error from server: %s (error num: %d)",
|
||||
strerror(errno_save), errno_save);
|
||||
} else {
|
||||
|
||||
+2
-2
@@ -256,7 +256,7 @@ void memo_send(User * u, char *name, char *text, int z)
|
||||
} else {
|
||||
u->lastmemosend = now;
|
||||
mi->memocount++;
|
||||
mi->memos = srealloc(mi->memos, sizeof(Memo) * mi->memocount);
|
||||
mi->memos = (Memo *)srealloc(mi->memos, sizeof(Memo) * mi->memocount);
|
||||
m = &mi->memos[mi->memocount - 1];
|
||||
strscpy(m->sender, source, NICKMAX);
|
||||
m->moduleData = NULL;
|
||||
@@ -293,7 +293,7 @@ void memo_send(User * u, char *name, char *text, int z)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < nc->aliases.count; i++) {
|
||||
na = nc->aliases.list[i];
|
||||
na = (NickAlias *)nc->aliases.list[i];
|
||||
if (na->u && nick_identified(na->u))
|
||||
notice_lang(s_MemoServ, na->u,
|
||||
MEMO_NEW_MEMO_ARRIVED, source,
|
||||
|
||||
+2
-2
@@ -281,10 +281,10 @@ int m_stats(char *source, int ac, char **av)
|
||||
for (i = 0; i < RootNumber; i++)
|
||||
anope_cmd_243("%s O * * %s Root 0", source,
|
||||
ServicesRoots[i]);
|
||||
for (i = 0; i < servadmins.count && (nc = servadmins.list[i]);
|
||||
for (i = 0; i < servadmins.count && (nc = (NickCore *)servadmins.list[i]);
|
||||
i++)
|
||||
anope_cmd_243("%s O * * %s Admin 0", source, nc->display);
|
||||
for (i = 0; i < servopers.count && (nc = servopers.list[i]);
|
||||
for (i = 0; i < servopers.count && (nc = (NickCore *)servopers.list[i]);
|
||||
i++)
|
||||
anope_cmd_243("%s O * * %s Oper 0", source, nc->display);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user