From 3eb1dd1be639dec05a1935259ee37485533226d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Wed, 22 Mar 2017 20:27:10 +0100 Subject: [PATCH] Silence compiler warnings about operator precedence. --- lib/digest/cryb_md4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/digest/cryb_md4.c b/lib/digest/cryb_md4.c index 6e0d027..6d72c84 100644 --- a/lib/digest/cryb_md4.c +++ b/lib/digest/cryb_md4.c @@ -68,11 +68,11 @@ md4_compute(md4_ctx *ctx, const uint8_t *data) C = ctx->state[2]; D = ctx->state[3]; -#define F(x, y, z) (x & y | ~x & z) +#define F(x, y, z) ((x & y) | (~x & z)) #define md4_round1(a, b, c, d, k, s) \ a = rol32(a + F(b, c, d) + X[k], s) -#define G(x, y, z) (x & y | x & z | y & z) +#define G(x, y, z) ((x & y) | (x & z) | (y & z)) #define md4_round2(a, b, c, d, k, s) \ a = rol32(a + G(b, c, d) + X[k] + 0x5a827999, s)