Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/rtsold Change previous to use uint32_t for 'interval'.
details: https://anonhg.NetBSD.org/src/rev/f69c34a660af
branches: trunk
changeset: 327852:f69c34a660af
user: dsl <dsl%NetBSD.org@localhost>
date: Tue Mar 18 20:39:55 2014 +0000
description:
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.
diffstat:
usr.sbin/rtsold/rtsold.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r 0a17f99f0968 -r f69c34a660af usr.sbin/rtsold/rtsold.c
--- a/usr.sbin/rtsold/rtsold.c Tue Mar 18 20:11:08 2014 +0000
+++ b/usr.sbin/rtsold/rtsold.c Tue Mar 18 20:39:55 2014 +0000
@@ -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 @@
{
#define MILLION 1000000
#define DADRETRY 10 /* XXX: adhoc */
- time_t interval;
+ uint32_t interval;
struct timeval now;
bzero(&ifinfo->timer, sizeof(ifinfo->timer));
Home |
Main Index |
Thread Index |
Old Index