summaryrefslogtreecommitdiff
path: root/src/common/timer.c
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2011-09-10 16:43:26 -0700
committerBen Longbons <b.r.longbons@gmail.com>2011-09-10 16:43:26 -0700
commit8f4e4e9a92f6af89820a358ab99b990697117502 (patch)
treecb312b5367c71dfe89543a5463be9555177c6445 /src/common/timer.c
parentf841b6fdcc802e73d52da0e67ee192c0c2c1c7e1 (diff)
parent2c863c0d99aa3df9ef2eb4ceb112c4d946520f0a (diff)
downloadtmwa-8f4e4e9a92f6af89820a358ab99b990697117502.tar.gz
tmwa-8f4e4e9a92f6af89820a358ab99b990697117502.tar.bz2
tmwa-8f4e4e9a92f6af89820a358ab99b990697117502.tar.xz
tmwa-8f4e4e9a92f6af89820a358ab99b990697117502.zip
Merge commit '2c863c0d99aa3df9ef2eb4ceb112c4d946520f0a'
Diffstat (limited to 'src/common/timer.c')
-rw-r--r--src/common/timer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/timer.c b/src/common/timer.c
index f4be19b..6795824 100644
--- a/src/common/timer.c
+++ b/src/common/timer.c
@@ -51,7 +51,7 @@ static void push_timer_heap (timer_id index)
if (timer_heap == NULL || timer_heap[0] + 1 >= timer_heap_max)
{
timer_heap_max += 256;
- RECREATE (timer_heap, int, timer_heap_max);
+ RECREATE (timer_heap, timer_id, timer_heap_max);
memset (timer_heap + (timer_heap_max - 256), 0, sizeof (timer_id) * 256);
}
// timer_heap[0] is the greatest index into the heap, which increases
@@ -71,14 +71,14 @@ static void push_timer_heap (timer_id index)
timer_heap[h + 1] = index;
}
-static timer_id top_timer_heap ()
+static timer_id top_timer_heap (void)
{
if (!timer_heap || !timer_heap[0])
return -1;
return timer_heap[1];
}
-static timer_id pop_timer_heap ()
+static timer_id pop_timer_heap (void)
{
if (!timer_heap || !timer_heap[0])
return -1;
@@ -227,7 +227,7 @@ interval_t do_timer (tick_t tick)
switch (timer_data[i].type)
{
case TIMER_ONCE_AUTODEL:
- timer_data[i].type = 0;
+ timer_data[i].type = TIMER_NONE;
if (free_timer_list_pos >= free_timer_list_max)
{
free_timer_list_max += 256;