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