1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-10-28 12:59:41 +01:00

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
This commit is contained in:
Junio C Hamano 2021-03-19 15:25:38 -07:00
commit a8a0ac3234
2 changed files with 2 additions and 2 deletions

View file

@ -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); \

View file

@ -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