about summary refs log tree commit diff
path: root/compat/getentropy_freebsd.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-11-24 17:49:55 -0500
committerJune McEnroe <june@causal.agency>2020-11-24 17:49:55 -0500
commit60d855cd6cd42d4300eb8b9e555986ca0075cda1 (patch)
treeeef26120be054e3942c1c19a43dbd73bf0f6122c /compat/getentropy_freebsd.c
parentMerge LibreSSL 3.2.2 into master (diff)
parentImport LibreSSL 3.3.0 (diff)
downloadlibretls-60d855cd6cd42d4300eb8b9e555986ca0075cda1.tar.gz
libretls-60d855cd6cd42d4300eb8b9e555986ca0075cda1.zip
Merge LibreSSL 3.3.0 into master 3.3.0
Diffstat (limited to '')
-rw-r--r--compat/getentropy_freebsd.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/compat/getentropy_freebsd.c b/compat/getentropy_freebsd.c
index 30cd68e..ea90ffe 100644
--- a/compat/getentropy_freebsd.c
+++ b/compat/getentropy_freebsd.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: getentropy_freebsd.c,v 1.3 2016/08/07 03:27:21 tb Exp $	*/
+/*	$OpenBSD: getentropy_freebsd.c,v 1.4 2020/10/12 22:08:33 deraadt Exp $	*/
 
 /*
  * Copyright (c) 2014 Pawel Jakub Dawidek <pjd@FreeBSD.org>
@@ -32,11 +32,9 @@
 static size_t
 getentropy_sysctl(u_char *buf, size_t size)
 {
-	int mib[2];
+	const int mib[2] = { CTL_KERN, KERN_ARND };
 	size_t len, done;
 
-	mib[0] = CTL_KERN;
-	mib[1] = KERN_ARND;
 	done = 0;
 
 	do {