Skip to content

Commit a8a0ac3

Browse files
committed
Merge branch 'rs/avoid-null-statement-after-macro-call'
Fix macros that can silently inject unintended null-statements. * rs/avoid-null-statement-after-macro-call: mem-pool: drop trailing semicolon from macro definition block-sha1: drop trailing semicolon from macro definition
2 parents 948e8ac + 116affa commit a8a0ac3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
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); \

mem-pool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include "cache.h"
66
#include "mem-pool.h"
77

8-
#define BLOCK_GROWTH_SIZE 1024*1024 - sizeof(struct mp_block);
8+
#define BLOCK_GROWTH_SIZE (1024 * 1024 - sizeof(struct mp_block))
99

1010
/*
1111
* Allocate a new mp_block and insert it after the block specified in

0 commit comments

Comments
 (0)