]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cleanup: fix two empty expression statement has no effect
authorDaniel Stenberg <daniel@haxx.se>
Wed, 30 Dec 2020 15:54:28 +0000 (16:54 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 30 Dec 2020 15:58:19 +0000 (16:58 +0100)
Follow-up to 26e46617b9

docs/examples/multi-single.c
lib/sha256.c

index c30447492c423a2a682e58e47c93d62c174857eb..2c64d2375177caac32a374164696a5d46340e9f6 100644 (file)
@@ -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
 
 /*
index c64ee093689fa0783012dc2365f0979d04043a8c..d915117917fc3573f565732fbce815cb30392fed 100644 (file)
@@ -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);