diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2020-05-16 19:07:05 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2020-05-16 19:07:05 +0000 |
commit | a19ea0ff87c63cacebde64424b63c6f06f2a137c (patch) | |
tree | 733392024f133cadf0d0398f4957f34ec1a908d5 /sys | |
parent | a9785a0892f05fe7a00b81b98545e4cad3528ef4 (diff) |
entropy_add_ptr and entropy_input_rotate are only used inside
enqueue_randomness(), so make them local static instead of global.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/rnd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/rnd.c b/sys/dev/rnd.c index c3c4cea2094..8a315c65f4b 100644 --- a/sys/dev/rnd.c +++ b/sys/dev/rnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rnd.c,v 1.211 2020/05/16 15:53:48 deraadt Exp $ */ +/* $OpenBSD: rnd.c,v 1.212 2020/05/16 19:07:04 deraadt Exp $ */ /* * Copyright (c) 2011 Theo de Raadt. @@ -142,8 +142,6 @@ struct timeout rnd_timeout; static u_int32_t entropy_pool[POOLWORDS]; u_int32_t entropy_pool0[POOLWORDS] __attribute__((section(".openbsd.randomdata"))); -u_int entropy_add_ptr; -u_char entropy_input_rotate; void dequeue_randomness(void *); void add_entropy_words(const u_int32_t *, u_int); @@ -239,6 +237,8 @@ add_entropy_words(const u_int32_t *buf, u_int n) 0x00000000, 0x3b6e20c8, 0x76dc4190, 0x4db26158, 0xedb88320, 0xd6d6a3e8, 0x9b64c2b0, 0xa00ae278 }; + static u_int entropy_add_ptr; + static u_char entropy_input_rotate; for (; n--; buf++) { u_int32_t w = (*buf << entropy_input_rotate) | |