|
@ -1,4 +1,4 @@ |
|
|
/* $OpenBSD: mrand48.c,v 1.4 2014/12/08 21:45:20 deraadt Exp $ */ |
|
|
|
|
|
|
|
|
/* $OpenBSD: mrand48.c,v 1.5 2014/12/09 00:02:18 tedu Exp $ */ |
|
|
/* |
|
|
/* |
|
|
* Copyright (c) 1993 Martin Birgmeier |
|
|
* Copyright (c) 1993 Martin Birgmeier |
|
|
* All rights reserved. |
|
|
* All rights reserved. |
|
@ -20,7 +20,7 @@ long |
|
|
mrand48(void) |
|
|
mrand48(void) |
|
|
{ |
|
|
{ |
|
|
if (__rand48_deterministic == 0) |
|
|
if (__rand48_deterministic == 0) |
|
|
return arc4random(); |
|
|
|
|
|
|
|
|
return (int)arc4random(); |
|
|
__dorand48(__rand48_seed); |
|
|
__dorand48(__rand48_seed); |
|
|
return ((long) __rand48_seed[2] << 16) + (long) __rand48_seed[1]; |
|
|
return ((long) __rand48_seed[2] << 16) + (long) __rand48_seed[1]; |
|
|
} |
|
|
} |