summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-12-30 16:54:28 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-12-30 16:58:19 +0100
commita6d20b89db8ee79b1a5f8188a680fea8047b145e (patch)
treeab08ac0cb92f9dd26f0171c6846760b4ec73d3e5 /lib
parent26e46617b9ef6cac9853854db5d5f6250a435392 (diff)
downloadcurl-a6d20b89db8ee79b1a5f8188a680fea8047b145e.tar.gz
cleanup: fix two empty expression statement has no effect
Follow-up to 26e46617b9
Diffstat (limited to 'lib')
-rw-r--r--lib/sha256.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/sha256.c b/lib/sha256.c
index c64ee0936..d91511791 100644
--- a/lib/sha256.c
+++ b/lib/sha256.c
@@ -344,11 +344,14 @@ static int sha256_compress(struct sha256_state *md,
}
/* Compress */
-#define RND(a,b,c,d,e,f,g,h,i) \
- unsigned long t0 = h + Sigma1(e) + Ch(e, f, g) + K[i] + W[i]; \
- unsigned long t1 = Sigma0(a) + Maj(a, b, c); \
- d += t0; \
- h = t0 + t1;
+#define RND(a,b,c,d,e,f,g,h,i) \
+ do { \
+ unsigned long t0 = h + Sigma1(e) + Ch(e, f, g) + K[i] + W[i]; \
+ unsigned long t1 = Sigma0(a) + Maj(a, b, c); \
+ d += t0; \
+ h = t0 + t1; \
+ } while(0)
+
for(i = 0; i < 64; ++i) {
unsigned long t;
RND(S[0], S[1], S[2], S[3], S[4], S[5], S[6], S[7], i);