diff options
-rw-r--r-- | sys/i386/isa/random_machdep.c | 6 | ||||
-rw-r--r-- | sys/kern/kern_random.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/i386/isa/random_machdep.c b/sys/i386/isa/random_machdep.c index 46ab680..f2f51a9 100644 --- a/sys/i386/isa/random_machdep.c +++ b/sys/i386/isa/random_machdep.c @@ -1,7 +1,7 @@ /* * random_machdep.c -- A strong random number generator * - * $Id: random_machdep.c,v 1.5 1996/04/07 17:38:39 bde Exp $ + * $Id: random_machdep.c,v 1.6 1996/04/07 18:16:26 bde Exp $ * * Version 0.95, last modified 18-Oct-95 * @@ -418,7 +418,7 @@ extract_entropy(struct random_bucket *r, char *buf, int nbytes) /* Copy data to destination buffer */ i = MIN(nbytes, 16); - memcpy(buf, (u_int8_t const *)tmp, i); + bcopy(tmp, buf, i); nbytes -= i; buf += i; } @@ -470,7 +470,7 @@ write_random(const char *buf, u_int nbytes) add_entropy_word(&random_state, *p); if (i) { word = 0; - memcpy(&word, p, i); + bcopy(p, &word, i); add_entropy_word(&random_state, word); } return nbytes; diff --git a/sys/kern/kern_random.c b/sys/kern/kern_random.c index 46ab680..f2f51a9 100644 --- a/sys/kern/kern_random.c +++ b/sys/kern/kern_random.c @@ -1,7 +1,7 @@ /* * random_machdep.c -- A strong random number generator * - * $Id: random_machdep.c,v 1.5 1996/04/07 17:38:39 bde Exp $ + * $Id: random_machdep.c,v 1.6 1996/04/07 18:16:26 bde Exp $ * * Version 0.95, last modified 18-Oct-95 * @@ -418,7 +418,7 @@ extract_entropy(struct random_bucket *r, char *buf, int nbytes) /* Copy data to destination buffer */ i = MIN(nbytes, 16); - memcpy(buf, (u_int8_t const *)tmp, i); + bcopy(tmp, buf, i); nbytes -= i; buf += i; } @@ -470,7 +470,7 @@ write_random(const char *buf, u_int nbytes) add_entropy_word(&random_state, *p); if (i) { word = 0; - memcpy(&word, p, i); + bcopy(p, &word, i); add_entropy_word(&random_state, word); } return nbytes; |