From: Dmitry Belyavskiy Date: Tue, 4 Jul 2017 10:33:42 +0000 (+0300) Subject: C89-compliance. X-Git-Tag: v1.1.0.2~7 X-Git-Url: https://wagner.pp.ru/gitweb/?a=commitdiff_plain;ds=inline;h=ea678abc1f9ea5acfdf2d5e5d6fa1c62add0631f;p=openssl-gost%2Fengine.git C89-compliance. --- diff --git a/gost12sum.c b/gost12sum.c index f59bc05..e766bac 100644 --- a/gost12sum.c +++ b/gost12sum.c @@ -216,6 +216,7 @@ int hash_stream(gost_hash_ctx * ctx, int fd, char *sum) unsigned char buffer[BUF_SIZE]; unsigned char reverted_buffer[BUF_SIZE]; ssize_t bytes; + size_t i; start_hash12(ctx); while ((bytes = read(fd, buffer, BUF_SIZE)) > 0) { @@ -225,7 +226,7 @@ int hash_stream(gost_hash_ctx * ctx, int fd, char *sum) return 0; } finish_hash12(ctx, buffer); - for (size_t i = 0; i < (hashsize / 8); i++) { + for (i = 0; i < (hashsize / 8); i++) { sprintf(sum + 2 * i, "%02x", buffer[i]); } return 1;