diff options
| author | Junio C Hamano <gitster@pobox.com> | 2021-03-19 15:25:38 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2021-03-19 15:25:38 -0700 |
| commit | a8a0ac3234317e47b2510f054a3a5b3d02564c98 (patch) | |
| tree | 0bc05d67abac6ce0d19b979d76fb4cffd6d6aabc | |
| parent | Merge branch 'km/config-doc-typofix' (diff) | |
| parent | mem-pool: drop trailing semicolon from macro definition (diff) | |
| download | git-a8a0ac3234317e47b2510f054a3a5b3d02564c98.tar.gz git-a8a0ac3234317e47b2510f054a3a5b3d02564c98.zip | |
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
| -rw-r--r-- | block-sha1/sha1.c | 2 | ||||
| -rw-r--r-- | mem-pool.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/block-sha1/sha1.c b/block-sha1/sha1.c index 8681031402..1bb6e7c069 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); \ diff --git a/mem-pool.c b/mem-pool.c index 8401761dda..ccdcad2e3d 100644 --- a/mem-pool.c +++ b/mem-pool.c @@ -5,7 +5,7 @@ #include "cache.h" #include "mem-pool.h" -#define BLOCK_GROWTH_SIZE 1024*1024 - sizeof(struct mp_block); +#define BLOCK_GROWTH_SIZE (1024 * 1024 - sizeof(struct mp_block)) /* * Allocate a new mp_block and insert it after the block specified in |
