On Sun, 22 May 2016, Andrey Chernov wrote:
On 22.05.2016 3:06, Bruce Evans wrote:
...
FreeBSD still has the ACM version in libkern, and has a fixed copy
of that in libc, with the bad old version under an ifdef.
The libc version now adjusts the range from [0, 0x7fff] to
0, 0x7ffd] and r
On 22.05.2016 3:06, Bruce Evans wrote:
> On Sat, 21 May 2016, Pedro Giffuni wrote:
>
>> On 05/21/16 16:55, Conrad Meyer wrote:
>>> On Sat, May 21, 2016 at 1:40 PM, Pedro Giffuni wrote:
On 05/21/16 14:05, Conrad Meyer wrote:
> Won't this still return a negative integer in many c
On Sat, 21 May 2016, Pedro Giffuni wrote:
On 05/21/16 16:55, Conrad Meyer wrote:
On Sat, May 21, 2016 at 1:40 PM, Pedro Giffuni wrote:
On 05/21/16 14:05, Conrad Meyer wrote:
Won't this still return a negative integer in many cases?
random(9) returns u_long, whereas this rand() routine ret
On 05/21/16 16:55, Conrad Meyer wrote:
On Sat, May 21, 2016 at 1:40 PM, Pedro Giffuni wrote:
On 05/21/16 14:05, Conrad Meyer wrote:
Won't this still return a negative integer in many cases?
random(9) returns u_long, whereas this rand() routine returns 'int'.
Even on architectures where l
On Sat, May 21, 2016 at 1:40 PM, Pedro Giffuni wrote:
>
>
> On 05/21/16 14:05, Conrad Meyer wrote:
>> Won't this still return a negative integer in many cases?
>>
>> random(9) returns u_long, whereas this rand() routine returns 'int'.
>>
>> Even on architectures where long is the same size as ordi
On 05/21/16 14:05, Conrad Meyer wrote:
On Sat, May 21, 2016 at 10:52 AM, Pedro F. Giffuni wrote:
Author: pfg
Date: Sat May 21 17:52:44 2016
New Revision: 300377
URL: https://svnweb.freebsd.org/changeset/base/300377
Log:
ndis(4): Avoid overflow.
This is a long standing problem: our rando
On Sat, May 21, 2016 at 10:52 AM, Pedro F. Giffuni wrote:
> Author: pfg
> Date: Sat May 21 17:52:44 2016
> New Revision: 300377
> URL: https://svnweb.freebsd.org/changeset/base/300377
>
> Log:
> ndis(4): Avoid overflow.
>
> This is a long standing problem: our random() function returns an
>
Author: pfg
Date: Sat May 21 17:52:44 2016
New Revision: 300377
URL: https://svnweb.freebsd.org/changeset/base/300377
Log:
ndis(4): Avoid overflow.
This is a long standing problem: our random() function returns an
unsigned integer but the rand provided by ndis(4) returns an int.
Scale i