Module Name:    src
Committed By:   dsl
Date:           Tue Mar 18 20:39:55 UTC 2014

Modified Files:
        src/usr.sbin/rtsold: rtsold.c

Log Message:
Change previous to use uint32_t for 'interval'.
The value is a random interval in usec obtained by reducing a uint32_t
  value modulo 1000000 (multiplied by a delay in seconds of 1).
The value is then being split into secs+usec and assigned to a timeval
  (and an interval).
With -Wsign-conversion the type has to be either an unsigned 32bit
  type, or a signed 64bit one.  This is just plain stupid.
Warning about conversions between signed and unsigned types really
  only makes sense if the compiler is dynamically tracking the domain
  of the value.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 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.39 src/usr.sbin/rtsold/rtsold.c:1.40
--- src/usr.sbin/rtsold/rtsold.c:1.39	Tue Mar 18 19:30:09 2014
+++ src/usr.sbin/rtsold/rtsold.c	Tue Mar 18 20:39:55 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtsold.c,v 1.39 2014/03/18 19:30:09 christos Exp $	*/
+/*	$NetBSD: rtsold.c,v 1.40 2014/03/18 20:39:55 dsl 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 */
-	time_t interval;
+	uint32_t interval;
 	struct timeval now;
 
 	bzero(&ifinfo->timer, sizeof(ifinfo->timer));

Reply via email to