From 4e4756e676877e3c2bfb3379cbd42b6c8ce88818 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 31 Mar 2017 10:10:27 +0200 Subject: [PATCH] Add braces for clarity --- .../crypto_core/curve25519/ref10/curve25519_ref10.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.c b/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.c index a2719a58..2cfe5e51 100644 --- a/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.c +++ b/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.c @@ -1188,10 +1188,10 @@ static void slide(signed char *r,const unsigned char *a) int b; int k; - for (i = 0;i < 256;++i) + for (i = 0;i < 256;++i) { r[i] = 1 & (a[i >> 3] >> (i & 7)); - - for (i = 0;i < 256;++i) + } + for (i = 0;i < 256;++i) { if (r[i]) { for (b = 1;b <= 6 && i + b < 256;++b) { if (r[i + b]) { @@ -1206,12 +1206,13 @@ static void slide(signed char *r,const unsigned char *a) } r[k] = 0; } - } else + } else { break; + } } } } - + } } static const ge_precomp Bi[8] = {