diff options
author | green <green@FreeBSD.org> | 2004-02-23 20:42:03 +0000 |
---|---|---|
committer | green <green@FreeBSD.org> | 2004-02-23 20:42:03 +0000 |
commit | eadc6af144d81c25bf574b2e33c9d4ab2e056824 (patch) | |
tree | 75793c3e558dc706786c974b664f4956b278a138 /lib/libc | |
parent | cf29d0ac9ebee8b74aec2d6595b28c84882300e9 (diff) | |
download | FreeBSD-src-eadc6af144d81c25bf574b2e33c9d4ab2e056824.zip FreeBSD-src-eadc6af144d81c25bf574b2e33c9d4ab2e056824.tar.gz |
Apply style(9).
Submitted by: "Christian S.J. Peron" <maneo@bsdpro.com>
PR: bin/63283
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/arc4random.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libc/gen/arc4random.c b/lib/libc/gen/arc4random.c index 522949a..16dc80f 100644 --- a/lib/libc/gen/arc4random.c +++ b/lib/libc/gen/arc4random.c @@ -122,6 +122,7 @@ arc4_getbyte(as) sj = as->s[as->j]; as->s[as->i] = sj; as->s[as->j] = si; + return (as->s[(si + sj) & 0xff]); } @@ -130,11 +131,13 @@ arc4_getword(as) struct arc4_stream *as; { u_int32_t val; + val = arc4_getbyte(as) << 24; val |= arc4_getbyte(as) << 16; val |= arc4_getbyte(as) << 8; val |= arc4_getbyte(as); - return val; + + return (val); } void @@ -162,7 +165,8 @@ arc4random() { if (!rs_initialized) arc4random_stir(); - return arc4_getword(&rs); + + return (arc4_getword(&rs)); } #if 0 |