Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/lib/libkern Redo part of rev. 1.10.



details:   https://anonhg.NetBSD.org/src/rev/667b1a299f7f
branches:  trunk
changeset: 570014:667b1a299f7f
user:      enami <enami%NetBSD.org@localhost>
date:      Fri Sep 17 21:54:28 2004 +0000

description:
Redo part of rev. 1.10.

diffstat:

 sys/lib/libkern/arc4random.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (21 lines):

diff -r 1d2eb851c463 -r 667b1a299f7f sys/lib/libkern/arc4random.c
--- a/sys/lib/libkern/arc4random.c      Fri Sep 17 20:46:03 2004 +0000
+++ b/sys/lib/libkern/arc4random.c      Fri Sep 17 21:54:28 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: arc4random.c,v 1.12 2004/09/08 04:06:15 yamt Exp $     */
+/*     $NetBSD: arc4random.c,v 1.13 2004/09/17 21:54:28 enami Exp $    */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -217,8 +217,9 @@
 
        buf = (u_int8_t *)p;
 
-       for (i = 0; i < len; buf[i] = arc4_randbyte(), i++);
-               arc4_numruns += len / sizeof(u_int32_t);
+       for (i = 0; i < len; buf[i] = arc4_randbyte(), i++)
+               ;
+       arc4_numruns += len / sizeof(u_int32_t);
        if ((arc4_numruns > ARC4_MAXRUNS) ||
            (mono_time.tv_sec > arc4_tv_nextreseed.tv_sec)) {
                arc4_randrekey();



Home | Main Index | Thread Index | Old Index