diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-12-30 16:54:28 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-12-30 16:58:19 +0100 |
commit | a6d20b89db8ee79b1a5f8188a680fea8047b145e (patch) | |
tree | ab08ac0cb92f9dd26f0171c6846760b4ec73d3e5 | |
parent | 26e46617b9ef6cac9853854db5d5f6250a435392 (diff) | |
download | curl-a6d20b89db8ee79b1a5f8188a680fea8047b145e.tar.gz |
cleanup: fix two empty expression statement has no effect
Follow-up to 26e46617b9
-rw-r--r-- | docs/examples/multi-single.c | 2 | ||||
-rw-r--r-- | lib/sha256.c | 13 |
2 files changed, 9 insertions, 6 deletions
diff --git a/docs/examples/multi-single.c b/docs/examples/multi-single.c index c30447492..2c64d2375 100644 --- a/docs/examples/multi-single.c +++ b/docs/examples/multi-single.c @@ -40,7 +40,7 @@ /* Portable sleep for platforms other than Windows. */ #define WAITMS(x) \ struct timeval wait = { 0, (x) * 1000 }; \ - (void)select(0, NULL, NULL, NULL, &wait); + (void)select(0, NULL, NULL, NULL, &wait) #endif /* 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); |