diff options
author | bde <bde@FreeBSD.org> | 1996-06-08 08:18:00 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1996-06-08 08:18:00 +0000 |
commit | 2aabf9403776db6ad169efb7b6d1bc783e05f5d9 (patch) | |
tree | b56182b8c9db323a2fe97d0b20400a90656ec3d2 /sys/i386/isa/random_machdep.c | |
parent | 4faf24f33e1ea5ab44e5804d20fecc5b3beb0a71 (diff) | |
download | FreeBSD-src-2aabf9403776db6ad169efb7b6d1bc783e05f5d9.zip FreeBSD-src-2aabf9403776db6ad169efb7b6d1bc783e05f5d9.tar.gz |
Replaced some memcpy()'s by bcopy()'s.
gcc only inlines memcpy()'s whose count is constant and didn't inline
these. I want memcpy() in the kernel go away so that it's obvious that
it doesn't need to be optimized. Now it is only used for one struct
copy in si.c.
Diffstat (limited to 'sys/i386/isa/random_machdep.c')
-rw-r--r-- | sys/i386/isa/random_machdep.c | 6 |
1 files changed, 3 insertions, 3 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; |