Module Name: src
Committed By: christos
Date: Tue Mar 18 19:30:09 UTC 2014
Modified Files:
src/usr.sbin/rtsold: rtsold.c
Log Message:
use time_t for time
To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/usr.sbin/rtsold/rtsold.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/rtsold/rtsold.c
diff -u src/usr.sbin/rtsold/rtsold.c:1.38 src/usr.sbin/rtsold/rtsold.c:1.39
--- src/usr.sbin/rtsold/rtsold.c:1.38 Mon Mar 17 20:16:49 2014
+++ src/usr.sbin/rtsold/rtsold.c Tue Mar 18 15:30:09 2014
@@ -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;