summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2020-05-16 19:07:04 +0000
committerderaadt <deraadt@openbsd.org>2020-05-16 19:07:04 +0000
commit615478668914c001bd74dfe46a11ec46789f4f50 (patch)
treea0485d8f33933b533c6972e62295c515cbe0e1a8
parentsync (diff)
downloadwireguard-openbsd-615478668914c001bd74dfe46a11ec46789f4f50.tar.xz
wireguard-openbsd-615478668914c001bd74dfe46a11ec46789f4f50.zip
entropy_add_ptr and entropy_input_rotate are only used inside
enqueue_randomness(), so make them local static instead of global.
-rw-r--r--sys/dev/rnd.c6
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) |