diff options
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/socket.c | 2 | ||||
-rw-r--r-- | src/common/timer.c | 4 | ||||
-rw-r--r-- | src/common/timer.h | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/common/socket.c b/src/common/socket.c index ac6846cb9..9b48f0401 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -907,7 +907,7 @@ static int connect_check_(uint32 ip) /// Timer function. /// Deletes old connection history records. -static int connect_check_clear(int tid, unsigned int tick, int id, int data) +static int connect_check_clear(int tid, unsigned int tick, int id, intptr data) { int i; int clear = 0; diff --git a/src/common/timer.c b/src/common/timer.c index 0eb16c45f..183daad30 100644 --- a/src/common/timer.c +++ b/src/common/timer.c @@ -239,7 +239,7 @@ static int acquire_timer(void) /// Starts a new timer that is deleted once it expires (single-use). /// Returns the timer's id. -int add_timer(unsigned int tick, TimerFunc func, int id, int data) +int add_timer(unsigned int tick, TimerFunc func, int id, intptr data) { int tid; @@ -257,7 +257,7 @@ int add_timer(unsigned int tick, TimerFunc func, int id, int data) /// Starts a new timer that automatically restarts itself (infinite loop until manually removed). /// Returns the timer's id, or -1 if it fails. -int add_timer_interval(unsigned int tick, TimerFunc func, int id, int data, int interval) +int add_timer_interval(unsigned int tick, TimerFunc func, int id, intptr data, int interval) { int tid; diff --git a/src/common/timer.h b/src/common/timer.h index 9c9d5c2b1..7a3dba4a8 100644 --- a/src/common/timer.h +++ b/src/common/timer.h @@ -19,7 +19,7 @@ // Struct declaration -typedef int (*TimerFunc)(int tid, unsigned int tick, int id, int data); +typedef int (*TimerFunc)(int tid, unsigned int tick, int id, intptr data); struct TimerData { unsigned int tick; @@ -30,7 +30,7 @@ struct TimerData { // general-purpose storage int id; - int data; + intptr data; }; // Function prototype declaration @@ -38,8 +38,8 @@ struct TimerData { unsigned int gettick(void); unsigned int gettick_nocache(void); -int add_timer(unsigned int tick, TimerFunc func, int id, int data); -int add_timer_interval(unsigned int tick, TimerFunc func, int id, int data, int interval); +int add_timer(unsigned int tick, TimerFunc func, int id, intptr data); +int add_timer_interval(unsigned int tick, TimerFunc func, int id, intptr data, int interval); struct TimerData* get_timer(int tid); int delete_timer(int tid, TimerFunc func); |