From eadc6af144d81c25bf574b2e33c9d4ab2e056824 Mon Sep 17 00:00:00 2001 From: green Date: Mon, 23 Feb 2004 20:42:03 +0000 Subject: [PATCH] Apply style(9). Submitted by: "Christian S.J. Peron" PR: bin/63283 --- lib/libc/gen/arc4random.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/libc/gen/arc4random.c b/lib/libc/gen/arc4random.c index 522949ad0b1d..16dc80f1350c 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