diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2019-07-05 16:48:28 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2019-07-05 16:49:09 +0200 |
commit | 2884f97bc5d3ea23e609ebd789b9c1d3e79764b3 (patch) | |
tree | 4a2e0866e6cfe4593b18d0d23c907cc7bd9f0b54 | |
parent | 0d4658740b4a7f94cdbbfaa6d4d7dbc047660d4c (diff) | |
download | libssh-2884f97bc5d3ea23e609ebd789b9c1d3e79764b3.tar.gz libssh-2884f97bc5d3ea23e609ebd789b9c1d3e79764b3.tar.xz libssh-2884f97bc5d3ea23e609ebd789b9c1d3e79764b3.zip |
dh_crypto: Use size_t for loop variable
Also don't declare the variable in the loop.
Fixes #157
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
-rw-r--r-- | src/dh_crypto.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dh_crypto.c b/src/dh_crypto.c index 56a76fab..0ccc3641 100644 --- a/src/dh_crypto.c +++ b/src/dh_crypto.c @@ -96,12 +96,14 @@ int ssh_dh_get_parameters(struct dh_ctx *ctx, int ssh_dh_set_parameters(struct dh_ctx *ctx, const bignum modulus, const bignum generator) { + size_t i; int rc; if ((ctx == NULL) || (modulus == NULL) || (generator == NULL)) { return SSH_ERROR; } - for (int i = 0; i < 2; i++) { + + for (i = 0; i < 2; i++) { bignum p = NULL; bignum g = NULL; |