]> git.saurik.com Git - apple/libc.git/blobdiff - gen/FreeBSD/nrand48.c
Libc-1272.250.1.tar.gz
[apple/libc.git] / gen / FreeBSD / nrand48.c
index 3a21c3f2a546f15b9becf59af71082222f92710e..1790b230f660b850105baf1c0d5f023b81702e9d 100644 (file)
@@ -19,6 +19,7 @@ __FBSDID("$FreeBSD: src/lib/libc/gen/nrand48.c,v 1.2 2002/03/22 21:52:05 obrien
 long
 nrand48(unsigned short xseed[3])
 {
-       _dorand48(xseed);
-       return ((long) xseed[2] << 15) + ((long) xseed[1] >> 1);
+       uint48 tmp;
+       DORAND48(tmp, xseed);
+       return (tmp >> 17) & 0x7fffffff;
 }