diff options
author | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-09-30 18:45:09 +0000 |
---|---|---|
committer | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-09-30 18:45:09 +0000 |
commit | d239984fb4f726d03f0392f84234e18f0344f8a3 (patch) | |
tree | b7ff6b59711cf442ab6d07e8e9dee482cc6ec1df /src/sessions.c | |
parent | 3e6f3f6b54a0f5810f19eae853893ff8d8a9eb9b (diff) |
Various g++ fixes. Compiles, doesn't link.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1180 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/sessions.c')
-rw-r--r-- | src/sessions.c | 12 |
1 files changed, 6 insertions, 6 deletions
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) { |