diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 2003-02-02 14:27:51 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 2003-02-02 14:27:51 +0000 |
commit | 62c4150e1ed8059b8c394ef1a53dd50641c7c664 (patch) | |
tree | f2319f87f9a9381db2858eec50d84e496e7ac20e /lib/libc/stdlib/rand.c | |
parent | b7f305981e4d57f8e63f5f1923acc8780eb07393 (diff) |
Notes
Diffstat (limited to 'lib/libc/stdlib/rand.c')
-rw-r--r-- | lib/libc/stdlib/rand.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/stdlib/rand.c b/lib/libc/stdlib/rand.c index 23cc201df564..5b81da22b444 100644 --- a/lib/libc/stdlib/rand.c +++ b/lib/libc/stdlib/rand.c @@ -86,8 +86,10 @@ int rand_r(unsigned int *ctx) { u_long val = (u_long) *ctx; - *ctx = do_rand(&val); - return (int) *ctx; + int r = do_rand(&val); + + *ctx = (unsigned int) val; + return (r); } |