diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2014-07-08 09:30:34 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2014-07-08 09:30:34 +0000 |
commit | ac9087758162df76952a59193bfdaa9e89f8d485 (patch) | |
tree | 6906815a612753ff55bd615f264152d8f6299417 | |
parent | d6bb18ba88ab6814159e8a7e5d7d886a8c242e1a (diff) |
j should be an int, like repeat
-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++) |