Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/rtsold use time_t for time



details:   https://anonhg.NetBSD.org/src/rev/6568631d9fef
branches:  trunk
changeset: 794590:6568631d9fef
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Mar 18 19:30:09 2014 +0000

description:
use time_t for time

diffstat:

 usr.sbin/rtsold/rtsold.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r db1dabb63535 -r 6568631d9fef usr.sbin/rtsold/rtsold.c
--- a/usr.sbin/rtsold/rtsold.c  Tue Mar 18 18:20:35 2014 +0000
+++ b/usr.sbin/rtsold/rtsold.c  Tue Mar 18 19:30:09 2014 +0000
@@ -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 @@
 {
 #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 @@
                        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;



Home | Main Index | Thread Index | Old Index