From modulus@h24-77-20-99.wp.shawcable.net  Mon Feb 23 12:19:54 2004
Return-Path: <modulus@h24-77-20-99.wp.shawcable.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id C8EAF16A4CE; Mon, 23 Feb 2004 12:19:54 -0800 (PST)
Received: from h24-77-20-99.wp.shawcable.net (h24-77-20-99.wp.shawcable.net [24.77.20.99])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id 25D1E43D2D; Mon, 23 Feb 2004 12:19:54 -0800 (PST)
	(envelope-from modulus@h24-77-20-99.wp.shawcable.net)
Received: from h24-77-20-99.wp.shawcable.net (localhost [127.0.0.1])
	by h24-77-20-99.wp.shawcable.net (8.12.10/8.12.10) with ESMTP id i1NKN2eO018153;
	Mon, 23 Feb 2004 20:23:02 GMT
	(envelope-from modulus@h24-77-20-99.wp.shawcable.net)
Received: (from root@localhost)
	by h24-77-20-99.wp.shawcable.net (8.12.10/8.12.10/Submit) id i1NKN1Ws018152;
	Mon, 23 Feb 2004 20:23:01 GMT
	(envelope-from modulus)
Message-Id: <200402232023.i1NKN1Ws018152@h24-77-20-99.wp.shawcable.net>
Date: Mon, 23 Feb 2004 20:23:01 GMT
From: "Christian S.J. Peron" <maneo@bsdpro.com>
Reply-To: "Christian S.J. Peron" <maneo@bsdpro.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: green@freebsd.org
Subject: [patch] libc arc4random style fix
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         63283
>Category:       bin
>Synopsis:       [patch] libc arc4random style fix
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 23 12:20:10 PST 2004
>Closed-Date:    Mon Feb 23 12:44:01 PST 2004
>Last-Modified:  Mon Feb 23 12:44:01 PST 2004
>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@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:
State-Changed-From-To: open->closed 
State-Changed-By: green 
State-Changed-When: Mon Feb 23 12:43:46 PST 2004 
State-Changed-Why:  
Applied, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=63283 
>Unformatted:
