aboutsummaryrefslogtreecommitdiff
path: root/gosthash2012.c
diff options
context:
space:
mode:
authorNikolay Morozov <nmorozoff77@yandex.ru>2020-05-18 16:40:43 +0300
committerDmitry Belyavskiy <beldmit@users.noreply.github.com>2020-05-18 20:51:47 +0300
commitc719289105537c5df301ccad0e6b7e94b6f7843d (patch)
treed1bd4d7d0212f1479c645ca83fd657a8ee366e4e /gosthash2012.c
parente8747a5b9f045f63501d77fbd760154753c60966 (diff)
downloadgost-engine-c719289105537c5df301ccad0e6b7e94b6f7843d.zip
gost-engine-c719289105537c5df301ccad0e6b7e94b6f7843d.tar.gz
gost-engine-c719289105537c5df301ccad0e6b7e94b6f7843d.tar.bz2
Fix code formating.
All tabs replcaded with spaces. One file was 2 tabs fornating.
Diffstat (limited to 'gosthash2012.c')
-rw-r--r--gosthash2012.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/gosthash2012.c b/gosthash2012.c
index 9548bfb..be1923c 100644
--- a/gosthash2012.c
+++ b/gosthash2012.c
@@ -69,28 +69,28 @@ static INLINE void add512(union uint512_u * RESTRICT x,
# ifdef HAVE_ADDCARRY_U64
for (i = 0; i < 8; i++)
- CF = _addcarry_u64(CF, x->QWORD[i] , y->QWORD[i], &(x->QWORD[i]));
+ CF = _addcarry_u64(CF, x->QWORD[i] , y->QWORD[i], &(x->QWORD[i]));
# else
for (i = 0; i < 8; i++) {
- const unsigned long long left = x->QWORD[i];
- unsigned long long sum;
-
- sum = left + y->QWORD[i] + CF;
- /*
- * (sum == left): is noop, because it's possible only
- * when `left' is added with `0 + 0' or with `ULLONG_MAX + 1',
- * in that case `CF' (carry) retain previous value, which is correct,
- * because when `left + 0 + 0' there was no overflow (thus no carry),
- * and when `left + ULLONG_MAX + 1' value is wrapped back to
- * itself with overflow, thus creating carry.
- *
- * (sum != left):
- * if `sum' is not wrapped (sum > left) there should not be carry,
- * if `sum' is wrapped (sum < left) there should be carry.
- */
- if (sum != left)
- CF = (sum < left);
- x->QWORD[i] = sum;
+ const unsigned long long left = x->QWORD[i];
+ unsigned long long sum;
+
+ sum = left + y->QWORD[i] + CF;
+ /*
+ * (sum == left): is noop, because it's possible only
+ * when `left' is added with `0 + 0' or with `ULLONG_MAX + 1',
+ * in that case `CF' (carry) retain previous value, which is correct,
+ * because when `left + 0 + 0' there was no overflow (thus no carry),
+ * and when `left + ULLONG_MAX + 1' value is wrapped back to
+ * itself with overflow, thus creating carry.
+ *
+ * (sum != left):
+ * if `sum' is not wrapped (sum > left) there should not be carry,
+ * if `sum' is wrapped (sum < left) there should be carry.
+ */
+ if (sum != left)
+ CF = (sum < left);
+ x->QWORD[i] = sum;
}
# endif /* !__x86_64__ */
#else /* __GOST3411_BIG_ENDIAN__ */