1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Timers: Add typecast to unit-converting macros

This commit is contained in:
Ondrej Zajicek (work)
2017-06-20 15:55:39 +02:00
parent 92cc1e7457
commit ee528fbd5d
7 changed files with 23 additions and 22 deletions

View File

@@ -55,8 +55,8 @@ radv_timer(timer *tm)
/* Update timer */
ifa->last = current_time();
btime t = (btime) ifa->cf->min_ra_int S;
btime r = (btime) (ifa->cf->max_ra_int - ifa->cf->min_ra_int) S;
btime t = ifa->cf->min_ra_int S;
btime r = (ifa->cf->max_ra_int - ifa->cf->min_ra_int) S;
t += random() % (r + 1);
if (ifa->initial)
@@ -93,7 +93,7 @@ radv_iface_notify(struct radv_iface *ifa, int event)
}
/* Update timer */
btime t = ifa->last + (btime) ifa->cf->min_delay S - current_time();
btime t = ifa->last + ifa->cf->min_delay S - current_time();
tm2_start(ifa->timer, t);
}