summaryrefslogtreecommitdiff
path: root/openbsd-compat/bsd-arc4random.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat/bsd-arc4random.c')
-rw-r--r--openbsd-compat/bsd-arc4random.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/openbsd-compat/bsd-arc4random.c b/openbsd-compat/bsd-arc4random.c
index 8bf31e5d3..92e7e7b58 100644
--- a/openbsd-compat/bsd-arc4random.c
+++ b/openbsd-compat/bsd-arc4random.c
@@ -19,6 +19,7 @@
19#include <sys/types.h> 19#include <sys/types.h>
20 20
21#include <string.h> 21#include <string.h>
22#include <stdlib.h>
22#include <stdarg.h> 23#include <stdarg.h>
23 24
24#include "log.h" 25#include "log.h"
@@ -88,7 +89,7 @@ void
88arc4random_buf(void *_buf, size_t n) 89arc4random_buf(void *_buf, size_t n)
89{ 90{
90 size_t i; 91 size_t i;
91 u_int32_t r; 92 u_int32_t r = 0;
92 char *buf = (char *)_buf; 93 char *buf = (char *)_buf;
93 94
94 for (i = 0; i < n; i++) { 95 for (i = 0; i < n; i++) {