summaryrefslogtreecommitdiff
path: root/block-sha1
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2021-03-13 16:17:30 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-03-17 17:20:01 (GMT)
commit3d8cbbf2c35141377a86a57a862e74c270e59a2a (patch)
tree7dd8b0f475c7252adf47b032f550b02ab0dbf4e2 /block-sha1
parent94f6e3e283f2adfc518b39cfc39291f1c2832ad0 (diff)
downloadgit-3d8cbbf2c35141377a86a57a862e74c270e59a2a.zip
git-3d8cbbf2c35141377a86a57a862e74c270e59a2a.tar.gz
git-3d8cbbf2c35141377a86a57a862e74c270e59a2a.tar.bz2
block-sha1: drop trailing semicolon from macro definition
23119ffb4e (block-sha1: put expanded macro parameters in parentheses, 2012-07-22) added a trailing semicolon to the definition of SHA_MIX without explanation. It doesn't matter with the current code, but make sure to avoid potential surprises by removing it again. This allows the macro to be used almost like a function: Users can combine it with operators of their choice, but still must not pass an expression with side-effects as a parameter, as it would be evaluated multiple times. Signed-off-by: René Scharfe <l.s.r@web.de> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'block-sha1')
-rw-r--r--block-sha1/sha1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block-sha1/sha1.c b/block-sha1/sha1.c
index 8681031..1bb6e7c 100644
--- a/block-sha1/sha1.c
+++ b/block-sha1/sha1.c
@@ -70,7 +70,7 @@
* the input data, the next mix it from the 512-bit array.
*/
#define SHA_SRC(t) get_be32((unsigned char *) block + (t)*4)
-#define SHA_MIX(t) SHA_ROL(W((t)+13) ^ W((t)+8) ^ W((t)+2) ^ W(t), 1);
+#define SHA_MIX(t) SHA_ROL(W((t)+13) ^ W((t)+8) ^ W((t)+2) ^ W(t), 1)
#define SHA_ROUND(t, input, fn, constant, A, B, C, D, E) do { \
unsigned int TEMP = input(t); setW(t, TEMP); \