diff options
author | 2004-04-02 20:17:45 +0000 | |
---|---|---|
committer | 2004-04-02 20:17:45 +0000 | |
commit | 1341bb09d25cfe89321daf4dd5e88ef3a4555705 (patch) | |
tree | e6a87db51c10d5d2acf47d8e2d948eeaf8d34c8f | |
parent | rfork(RFMEM) shares complete vmspace. much more useful, and in line with (diff) | |
download | wireguard-openbsd-1341bb09d25cfe89321daf4dd5e88ef3a4555705.tar.xz wireguard-openbsd-1341bb09d25cfe89321daf4dd5e88ef3a4555705.zip |
kill _8 api completely
-rw-r--r-- | sys/dev/rnd.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/sys/dev/rnd.c b/sys/dev/rnd.c index bdd59a0c0e2..11befa342ca 100644 --- a/sys/dev/rnd.c +++ b/sys/dev/rnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rnd.c,v 1.67 2004/03/15 14:17:25 mickey Exp $ */ +/* $OpenBSD: rnd.c,v 1.68 2004/04/02 20:17:45 mickey Exp $ */ /* * rnd.c -- A strong random number generator @@ -582,15 +582,6 @@ arc4_reinit(v) arc4random_initialized = 0; } -static int arc4random_8(void); - -static int -arc4random_8(void) -{ - arc4maybeinit(); - return arc4_getbyte(); -} - u_int32_t arc4random(void) { @@ -1023,8 +1014,9 @@ randomread(dev, uio, ioflag) { u_int8_t *cp = (u_int8_t *) buf; u_int8_t *end = cp + n; + arc4maybeinit(); while (cp < end) - *cp++ = arc4random_8(); + *cp++ = arc4_getbyte(); break; } default: |