]> git.saurik.com Git - apple/libc.git/blobdiff - gen/FreeBSD/lrand48.c
Libc-1439.100.3.tar.gz
[apple/libc.git] / gen / FreeBSD / lrand48.c
index 948b923a529d80a83c195290484eb92f2d133e7b..3b01e850a4445591d7da9fa7a890cd158fbc95c0 100644 (file)
@@ -16,11 +16,9 @@ __FBSDID("$FreeBSD: src/lib/libc/gen/lrand48.c,v 1.2 2002/03/22 21:52:05 obrien
 
 #include "rand48.h"
 
-extern unsigned short _rand48_seed[3];
-
 long
 lrand48(void)
 {
-       _dorand48(_rand48_seed);
-       return ((long) _rand48_seed[2] << 15) + ((long) _rand48_seed[1] >> 1);
+       _DORAND48(_rand48_seed);
+       return (_rand48_seed >> 17) & 0x7fffffff;
 }