2004-10-11 Paul Jakma <paul@dishone.st>
* thread.c: (funcname_thread_add_timer)
(funcname_thread_add_timer_msec) Fix mistakes from last change.
Pointed out by Liu Xin in [quagga-dev 1609].
diff --git a/lib/thread.c b/lib/thread.c
index 2847b8b..e1625e3 100644
--- a/lib/thread.c
+++ b/lib/thread.c
@@ -534,7 +534,7 @@
assert (m != NULL);
- trel.tv_sec += timer;
+ trel.tv_sec = timer;
trel.tv_usec = 0;
return funcname_thread_add_timer_timeval (m, func, arg, &trel, funcname);
@@ -552,8 +552,8 @@
timer = 1000*timer; /* milli -> micro */
- trel.tv_sec += timer / TIMER_SECOND_MICRO;
- trel.tv_usec += (timer % TIMER_SECOND_MICRO);
+ trel.tv_sec = timer / TIMER_SECOND_MICRO;
+ trel.tv_usec = (timer % TIMER_SECOND_MICRO);
return funcname_thread_add_timer_timeval (m, func, arg, &trel, funcname);
}