bin/63283: [patch] libc arc4random style fix

Christian S.J. Peron maneo at bsdpro.com
Mon Feb 23 12:20:11 PST 2004


>Number:         63283
>Category:       bin
>Synopsis:       [patch] libc arc4random style fix
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 23 12:20:10 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Christian S.J. Peron
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
>Environment:
System: FreeBSD movl 5.2-CURRENT FreeBSD 5.2-CURRENT #8: Mon Feb 2 22:04:49 GMT 2004 modulus at movl:/usr/src/sys/i386/compile/ROUTER i386


	
>Description:
	style fix for arc4random.c (libc)

	
>How-To-Repeat:
	N/A
	
>Fix:

--- lib/libc/gen/arc4random.c.bak	Fri Feb 20 05:28:01 2004
+++ lib/libc/gen/arc4random.c	Sat Feb 21 02:18:30 2004
@@ -124,6 +124,7 @@
 	sj = as->s[as->j];
 	as->s[as->i] = sj;
 	as->s[as->j] = si;
+
 	return (as->s[(si + sj) & 0xff]);
 }
 
@@ -132,11 +133,13 @@
 	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
@@ -164,7 +167,8 @@
 {
 	if (!rs_initialized)
 		arc4random_stir();
-	return arc4_getword(&rs);
+
+	return (arc4_getword(&rs));
 }
 
 #if 0
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list