Skip to content

Commit 3d8cbbf

Browse files
rscharfegitster
authored andcommitted
block-sha1: drop trailing semicolon from macro definition
23119ff (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 <[email protected]> Reviewed-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 94f6e3e commit 3d8cbbf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

block-sha1/sha1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
* the input data, the next mix it from the 512-bit array.
7171
*/
7272
#define SHA_SRC(t) get_be32((unsigned char *) block + (t)*4)
73-
#define SHA_MIX(t) SHA_ROL(W((t)+13) ^ W((t)+8) ^ W((t)+2) ^ W(t), 1);
73+
#define SHA_MIX(t) SHA_ROL(W((t)+13) ^ W((t)+8) ^ W((t)+2) ^ W(t), 1)
7474

7575
#define SHA_ROUND(t, input, fn, constant, A, B, C, D, E) do { \
7676
unsigned int TEMP = input(t); setW(t, TEMP); \

0 commit comments

Comments
 (0)