diff options
| author | 2014-07-08 09:30:33 +0000 | |
|---|---|---|
| committer | 2014-07-08 09:30:33 +0000 | |
| commit | e4e2062fab2360fc33d6b91c688db3cd76c66376 (patch) | |
| tree | 800c4a24ef2b7e99c9ed9ed3d319cef24747039d /lib/libcrypto/crypto/getentropy_linux.c | |
| parent | KNF. (diff) | |
| download | wireguard-openbsd-e4e2062fab2360fc33d6b91c688db3cd76c66376.tar.xz wireguard-openbsd-e4e2062fab2360fc33d6b91c688db3cd76c66376.zip | |
j should be an int, like repeat
Diffstat (limited to 'lib/libcrypto/crypto/getentropy_linux.c')
| -rw-r--r-- | lib/libcrypto/crypto/getentropy_linux.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libcrypto/crypto/getentropy_linux.c b/lib/libcrypto/crypto/getentropy_linux.c index a76604fe77a..578c65bbe47 100644 --- a/lib/libcrypto/crypto/getentropy_linux.c +++ b/lib/libcrypto/crypto/getentropy_linux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getentropy_linux.c,v 1.16 2014/07/08 09:24:27 beck Exp $ */ +/* $OpenBSD: getentropy_linux.c,v 1.17 2014/07/08 09:30:33 beck Exp $ */ /* * Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org> @@ -298,7 +298,7 @@ getentropy_fallback(void *buf, size_t len) SHA512_CTX ctx; static pid_t lastpid; pid_t pid; - size_t i, j, ii; + size_t i, ii; char *p; pid = getpid(); @@ -311,12 +311,13 @@ getentropy_fallback(void *buf, size_t len) repeat = REPEAT; } for (i = 0; i < len; ) { + int j; SHA512_Init(&ctx); for (j = 0; j < repeat; j++) { HX((e = gettimeofday(&tv, NULL)) == -1, tv); if (e != -1) { cnt += (int)tv.tv_sec; - cnt += (int)tv.tv_usec; + nt += (int)tv.tv_usec; } for (ii = 0; ii < sizeof(cl)/sizeof(cl[0]); ii++) |
