From 23b7b4606f6a3e15945b480ad6deb085b4528350 Mon Sep 17 00:00:00 2001 From: christos Date: Tue, 18 Mar 2014 19:30:09 +0000 Subject: [PATCH] use time_t for time --- usr.sbin/rtsold/rtsold.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/rtsold/rtsold.c b/usr.sbin/rtsold/rtsold.c index faa5653a00ac..3d235d8f71b7 100644 --- a/usr.sbin/rtsold/rtsold.c +++ b/usr.sbin/rtsold/rtsold.c @@ -1,4 +1,4 @@ -/* $NetBSD: rtsold.c,v 1.38 2014/03/18 00:16:49 christos Exp $ */ +/* $NetBSD: rtsold.c,v 1.39 2014/03/18 19:30:09 christos Exp $ */ /* $KAME: rtsold.c,v 1.77 2004/01/03 01:35:13 itojun Exp $ */ /* @@ -565,7 +565,7 @@ rtsol_timer_update(struct ifinfo *ifinfo) { #define MILLION 1000000 #define DADRETRY 10 /* XXX: adhoc */ - long interval; + time_t interval; struct timeval now; bzero(&ifinfo->timer, sizeof(ifinfo->timer)); @@ -587,7 +587,7 @@ rtsol_timer_update(struct ifinfo *ifinfo) ifinfo->timer = tm_max; /* stop timer(valid?) */ break; case IFS_DELAY: - interval = arc4random() % (MAX_RTR_SOLICITATION_DELAY * MILLION); + interval = (time_t) (arc4random() % (MAX_RTR_SOLICITATION_DELAY * MILLION)); ifinfo->timer.tv_sec = interval / MILLION; ifinfo->timer.tv_usec = (suseconds_t)(interval % MILLION); break;