clang-tidy: enable readability-math-missing-parentheses, adjust code

No functional changes.

Also:
- md4, md5: drop redundant parentheses from macro values.

Closes #20691
This commit is contained in:
Viktor Szakats 2026-02-23 00:59:57 +01:00
parent 29bca12978
commit 65262be0ab
No known key found for this signature in database
40 changed files with 85 additions and 80 deletions

View file

@ -218,12 +218,12 @@ typedef struct md4_ctx MD4_CTX;
#define MD4_SET(n) (*(const uint32_t *)(const void *)&ptr[(n) * 4])
#define MD4_GET(n) MD4_SET(n)
#else
#define MD4_SET(n) (ctx->block[(n)] = \
(uint32_t)ptr[(n) * 4] | \
((uint32_t)ptr[(n) * 4 + 1] << 8) | \
((uint32_t)ptr[(n) * 4 + 2] << 16) | \
((uint32_t)ptr[(n) * 4 + 3] << 24))
#define MD4_GET(n) (ctx->block[(n)])
#define MD4_SET(n) (ctx->block[n] = \
(uint32_t)ptr[(n) * 4] | \
((uint32_t)ptr[((n) * 4) + 1] << 8) | \
((uint32_t)ptr[((n) * 4) + 2] << 16) | \
((uint32_t)ptr[((n) * 4) + 3] << 24))
#define MD4_GET(n) ctx->block[n]
#endif
/*