summaryrefslogtreecommitdiff
path: root/src/timeout.c
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-22 01:11:19 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-22 01:11:19 +0000
commit16e667a2cecf9492954333fc7949b6636072f941 (patch)
tree746164afdc56c0a30dea0f1736c4129c1f1ad422 /src/timeout.c
parent1532aa675f7c28b8ff0061ebc21f374d36d89d65 (diff)
Replaced most uses of smalloc and scalloc with new, replaced most uses of free with delete.
NOTE: This build is unstable due to lack of memory zeroing, this will be addresses in a future commit. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1783 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/timeout.c')
-rw-r--r--src/timeout.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/timeout.c b/src/timeout.c
index 99e47164d..d3a69bf6d 100644
--- a/src/timeout.c
+++ b/src/timeout.c
@@ -51,7 +51,7 @@ void check_timeouts(void)
to->prev->next = to->next;
else
timeouts = to->next;
- free(to);
+ delete to;
to = to2;
}
if (debug >= 2)
@@ -68,7 +68,7 @@ void check_timeouts(void)
Timeout *add_timeout(int delay, void (*code) (Timeout *), int repeat)
{
- Timeout *t = (Timeout *)scalloc(sizeof(Timeout), 1);
+ Timeout *t = new Timeout;
t->settime = time(NULL);
t->timeout = t->settime + delay;
t->code = code;
@@ -101,7 +101,7 @@ void del_timeout(Timeout * t)
timeouts = t->next;
if (t->next)
t->next->prev = t->prev;
- free(t);
+ delete t;
}
/*************************************************************************/