summaryrefslogtreecommitdiff
path: root/src/common/timer.c
diff options
context:
space:
mode:
authoramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-29 06:18:21 +0000
committeramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-29 06:18:21 +0000
commitc1a8f6f0ac98a694e670bae4c8f74db126e0e8e8 (patch)
tree57a37cf82ced0b0b998b99e5dfdc27d62932420a /src/common/timer.c
parent7bfe35400c79bf97a5b0bed9f170912c37cf9452 (diff)
downloadhercules-c1a8f6f0ac98a694e670bae4c8f74db126e0e8e8.tar.gz
hercules-c1a8f6f0ac98a694e670bae4c8f74db126e0e8e8.tar.bz2
hercules-c1a8f6f0ac98a694e670bae4c8f74db126e0e8e8.tar.xz
hercules-c1a8f6f0ac98a694e670bae4c8f74db126e0e8e8.zip
Fixe compile time problems with our mixed C++/C conformance
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1328 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/timer.c')
-rw-r--r--src/common/timer.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/common/timer.c b/src/common/timer.c
index 6bf5cdbda..6a740d47a 100644
--- a/src/common/timer.c
+++ b/src/common/timer.c
@@ -54,9 +54,9 @@ int add_timer_func_list(int (*func)(int,unsigned int,int,int), char* name) {
struct timer_func_list* tfl;
//CALLOC(tfl, struct timer_func_list, 1);
- tfl = aCalloc( sizeof(struct timer_func_list) , 1);
+ tfl = (struct timer_func_list*) aCalloc( sizeof(struct timer_func_list) , 1);
//MALLOC(tfl->name, char, strlen(name) + 1);
- tfl->name = aMalloc( strlen(name) + 1 );
+ tfl->name = (char *) aMalloc( strlen(name) + 1 );
tfl->next = tfl_root;
tfl->func = func;
@@ -112,11 +112,11 @@ static void push_timer_heap(int index) {
if (timer_heap_max == 0) {
timer_heap_max = 256;
//CALLOC(timer_heap, int, 256);
- timer_heap = aCalloc( sizeof(int) , 256);
+ timer_heap = (int *) aCalloc( sizeof(int) , 256);
} else {
timer_heap_max += 256;
//REALLOC(timer_heap, int, timer_heap_max);
- timer_heap = aRealloc( timer_heap, sizeof(int) * timer_heap_max);
+ timer_heap = (int *) aRealloc( timer_heap, sizeof(int) * timer_heap_max);
memset(timer_heap + (timer_heap_max - 256), 0, sizeof(int) * 256);
}
}
@@ -178,11 +178,11 @@ int add_timer(unsigned int tick,int (*func)(int,unsigned int,int,int),int id,int
if (timer_data_max == 0) {
timer_data_max = 256;
//CALLOC(timer_data, struct TimerData, timer_data_max);
- timer_data = aCalloc( sizeof(struct TimerData) , timer_data_max);
+ timer_data = (struct TimerData*) aCalloc( sizeof(struct TimerData) , timer_data_max);
} else {
timer_data_max += 256;
//REALLOC(timer_data, struct TimerData, timer_data_max);
- timer_data = aRealloc( timer_data, sizeof(struct TimerData) * timer_data_max);
+ timer_data = (struct TimerData *) aRealloc( timer_data, sizeof(struct TimerData) * timer_data_max);
memset(timer_data + (timer_data_max - 256), 0, sizeof(struct TimerData) * 256);
}
}
@@ -267,7 +267,7 @@ int do_timer(unsigned int tick) {
if (free_timer_list_pos >= free_timer_list_max) {
free_timer_list_max += 256;
//REALLOC(free_timer_list, int, free_timer_list_max);
- free_timer_list = aRealloc(free_timer_list, sizeof(int) * free_timer_list_max);
+ free_timer_list = (int *) aRealloc(free_timer_list, sizeof(int) * free_timer_list_max);
memset(free_timer_list + (free_timer_list_max - 256), 0, 256 * sizeof(int));
}
free_timer_list[free_timer_list_pos++] = i;