summaryrefslogtreecommitdiff
path: root/openbsd-compat/bsd-arc4random.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2008-05-19 15:26:54 +1000
committerDamien Miller <djm@mindrot.org>2008-05-19 15:26:54 +1000
commitcaaed01e90edc41d43334868f14f4f994927b2cd (patch)
treed02dd2b2f9cbbbdaa44f623737f32bf0fe5629db /openbsd-compat/bsd-arc4random.c
parentb84886ba3e362f54b70aefcbe1aa10606309b7d7 (diff)
- (djm) [openbsd-compat/bsd-arc4random.c] Warning fixes
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++) {