Re: CVS commit: src/usr.sbin/rtsold

2014-03-25 Thread David Laight
On Tue, Mar 25, 2014 at 05:17:44PM +, Joerg Sonnenberger wrote:
 Module Name:  src
 Committed By: joerg
 Date: Tue Mar 25 17:17:44 UTC 2014
 
 Modified Files:
   src/usr.sbin/rtsold: rtsold.c
 
 Log Message:
 Don't cast to time_t just to implicitly cast to uint32_t next.

Gah - I hadn't spotted that xtos had added a cast as well.
There is another cast that ought to be pointless two lines later.

David

-- 
David Laight: da...@l8s.co.uk


Re: CVS commit: src/usr.sbin/rtsold

2014-03-18 Thread David Laight
On Tue, Mar 18, 2014 at 03:30:09PM -0400, Christos Zoulas wrote:
 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

It isn't a time_t type time.
The value is actually an interval in microseconds and bounded to less than
a second.

The code is doing:
long x = arc4random() % (1 * 100);
That really shouldn't generate a compiler warning.

David

-- 
David Laight: da...@l8s.co.uk


Re: CVS commit: src/usr.sbin/rtsold

2014-03-18 Thread Christos Zoulas
In article 20140318201420.go20...@snowdrop.l8s.co.uk,
David Laight  da...@l8s.co.uk wrote:
On Tue, Mar 18, 2014 at 03:30:09PM -0400, Christos Zoulas wrote:
 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

It isn't a time_t type time.

It is assigned to a time_t. long might not be wide enough; the value is
unsigned and it is assigned to a signed type.

christos



Re: CVS commit: src/usr.sbin/rtsold

2014-03-18 Thread David Laight
On Tue, Mar 18, 2014 at 08:21:19PM +, Christos Zoulas wrote:
 In article 20140318201420.go20...@snowdrop.l8s.co.uk,
 David Laight  da...@l8s.co.uk wrote:
 On Tue, Mar 18, 2014 at 03:30:09PM -0400, Christos Zoulas wrote:
  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
 
 It isn't a time_t type time.
 
 It is assigned to a time_t. long might not be wide enough; the value is
 unsigned and it is assigned to a signed type.

Only if 'long' is smaller than 100.
i386 fails on the line:
long interval = arc4random() /* uint32_t */ % 100;
If you use 'unsigned long' then amd64 fails a line later doing:
xxx.tv_usec = interval / 100;
The compiler should be able to tell that neither of those lines
is going to cause any problems.

There is no reason to force 32bit systems to do unnecessary 64bit maths.

David

-- 
David Laight: da...@l8s.co.uk


Re: CVS commit: src/usr.sbin/rtsold

2013-05-26 Thread Thomas Klausner
On Sat, May 25, 2013 at 01:37:53AM +0700, Robert Elz wrote:
 Date:Fri, 24 May 2013 16:47:08 +
 From:David Holland dholland-sourcechan...@netbsd.org
 Message-ID:  20130524164708.ga...@netbsd.org
 
   |  : -The default interval for router advertisements, which is on the order 
 of 10
   |  : +The default interval for router advertisements, which is in the order 
 of 10
   | 
   | ...it should be on
 
 Actually, I think it should be of.
 
 in when it relates to orders would be used for the kind of order where
 a follows b follows c - those are in the order of ...
 
 on when it relates to orders would refer to something that is written,
 and there may be a note, on the order, that X should be added, or ...
 
 of when it relates to orders comes to comparisons, and is the variant
 that is meant here, it means approximately 10 minutes, or of the order
 of 10 minutes.

I'm glad that grammar topics get such a verbose discussion :)

Could one of the native speakers please fix it in a way that we won't
have this discussion again?

Thanks,
 Thomas


Re: CVS commit: src/usr.sbin/rtsold

2013-05-26 Thread Robert Elz
Date:Sun, 26 May 2013 12:54:44 +0200
From:Thomas Klausner w...@netbsd.org
Message-ID:  20130526105444.gu9...@danbala.tuwien.ac.at

  | Could one of the native speakers please fix it in a way that we won't
  | have this discussion again?

Try the patch below, which I think is both correct, and acceptable in all
dialects of English...

kre

--- rtsold.8.was2013-05-26 23:59:52.0 +0700
+++ rtsold.82013-05-27 00:00:56.0 +0700
@@ -102,8 +102,9 @@
 daemon cannot get the interface status.
 This feature does not conform to the IPv6 neighbor discovery
 specification, but is provided for mobile stations.
-The default interval for router advertisements, which is on the order of 10
-minutes, is slightly long for mobile stations.
+The default interval for router advertisements,
+which is approximately 10 minutes,
+is slightly long for mobile stations.
 This feature is provided
 for such stations so that they can find new routers as soon as possible
 when they attach to another link.




Re: CVS commit: src/usr.sbin/rtsold

2013-05-26 Thread Thomas Klausner
On Mon, May 27, 2013 at 12:03:56AM +0700, Robert Elz wrote:
 Date:Sun, 26 May 2013 12:54:44 +0200
 From:Thomas Klausner w...@netbsd.org
 Message-ID:  20130526105444.gu9...@danbala.tuwien.ac.at
 
   | Could one of the native speakers please fix it in a way that we won't
   | have this discussion again?
 
 Try the patch below, which I think is both correct, and acceptable in all
 dialects of English...

Committed, thanks.
 Thomas

 kre
 
 --- rtsold.8.was  2013-05-26 23:59:52.0 +0700
 +++ rtsold.8  2013-05-27 00:00:56.0 +0700
 @@ -102,8 +102,9 @@
  daemon cannot get the interface status.
  This feature does not conform to the IPv6 neighbor discovery
  specification, but is provided for mobile stations.
 -The default interval for router advertisements, which is on the order of 10
 -minutes, is slightly long for mobile stations.
 +The default interval for router advertisements,
 +which is approximately 10 minutes,
 +is slightly long for mobile stations.
  This feature is provided
  for such stations so that they can find new routers as soon as possible
  when they attach to another link.
 


Re: CVS commit: src/usr.sbin/rtsold

2013-05-24 Thread David Holland
On Fri, May 24, 2013 at 04:38:46PM +, Thomas Klausner wrote:
  Modified Files:
   src/usr.sbin/rtsold: rtsold.8
  
  Log Message:
  Correct a phrase. From jmc@openbsd.
  
  Already fixed once by mbalmer and unfixed by me. Oops.

 : -The default interval for router advertisements, which is on the order of 10
 : +The default interval for router advertisements, which is in the order of 10

...it should be on

-- 
David A. Holland
dholl...@netbsd.org


Re: CVS commit: src/usr.sbin/rtsold

2013-05-24 Thread Robert Elz
Date:Fri, 24 May 2013 16:47:08 +
From:David Holland dholland-sourcechan...@netbsd.org
Message-ID:  20130524164708.ga...@netbsd.org

  |  : -The default interval for router advertisements, which is on the order 
of 10
  |  : +The default interval for router advertisements, which is in the order 
of 10
  | 
  | ...it should be on

Actually, I think it should be of.

in when it relates to orders would be used for the kind of order where
a follows b follows c - those are in the order of ...

on when it relates to orders would refer to something that is written,
and there may be a note, on the order, that X should be added, or ...

of when it relates to orders comes to comparisons, and is the variant
that is meant here, it means approximately 10 minutes, or of the order
of 10 minutes.

kre



Re: CVS commit: src/usr.sbin/rtsold

2013-05-24 Thread Warner Losh

On May 24, 2013, at 12:37 PM, Robert Elz wrote:

Date:Fri, 24 May 2013 16:47:08 +
From:David Holland dholland-sourcechan...@netbsd.org
Message-ID:  20130524164708.ga...@netbsd.org
 
  |  : -The default interval for router advertisements, which is on the order 
 of 10
  |  : +The default interval for router advertisements, which is in the order 
 of 10
  | 
  | ...it should be on
 
 Actually, I think it should be of.
 
 in when it relates to orders would be used for the kind of order where
 a follows b follows c - those are in the order of ...
 
 on when it relates to orders would refer to something that is written,
 and there may be a note, on the order, that X should be added, or ...
 
 of when it relates to orders comes to comparisons, and is the variant
 that is meant here, it means approximately 10 minutes, or of the order
 of 10 minutes.

In the US we use on for what you've said you'd think you'd use of. on the 
order of 10 minutes means about 10 minutes.

I think the original text was correct.

But it would be perhaps more international to say which should be 
approximately 10.

Warner



Re: CVS commit: src/usr.sbin/rtsold

2013-05-24 Thread Hisashi T Fujinaka

On Sat, 25 May 2013, Robert Elz wrote:


   Date:Fri, 24 May 2013 16:47:08 +
   From:David Holland dholland-sourcechan...@netbsd.org
   Message-ID:  20130524164708.ga...@netbsd.org

 |  : -The default interval for router advertisements, which is on the order of 
10
 |  : +The default interval for router advertisements, which is in the order of 
10
 |
 | ...it should be on

Actually, I think it should be of.

in when it relates to orders would be used for the kind of order where
a follows b follows c - those are in the order of ...

on when it relates to orders would refer to something that is written,
and there may be a note, on the order, that X should be added, or ...

of when it relates to orders comes to comparisons, and is the variant
that is meant here, it means approximately 10 minutes, or of the order
of 10 minutes.


In US English, it would be on the order of which means around or
about. In fact, can't we just replace it with one of those?

--
Hisashi T Fujinaka - ht...@twofifty.com
BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte


CVS commit: src/usr.sbin/rtsold

2010-01-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jan 18 04:53:10 UTC 2010

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

Log Message:
check if i is in range before using it.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/rtsold/probe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.sbin/rtsold

2010-01-11 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Mon Jan 11 09:21:39 UTC 2010

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

Log Message:
some wording fixes


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/usr.sbin/rtsold/rtsold.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.sbin/rtsold

2010-01-11 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Jan 11 09:49:19 UTC 2010

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

Log Message:
New sentence, new line.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/usr.sbin/rtsold/rtsold.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.