From af8e81d0a0e87140cca3d96c19c18316932f57ff Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 18 Mar 2019 22:07:44 +0100 Subject: [PATCH] bool as bitwise --- common/crapto1/crapto1.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/crapto1/crapto1.c b/common/crapto1/crapto1.c index ddc9f7be5..17355e162 100644 --- a/common/crapto1/crapto1.c +++ b/common/crapto1/crapto1.c @@ -38,8 +38,8 @@ static void __attribute__((constructor)) fill_lut() { static inline void update_contribution(uint32_t *item, const uint32_t mask1, const uint32_t mask2) { uint32_t p = *item >> 25; - p = p << 1 | evenparity32(*item & mask1); - p = p << 1 | evenparity32(*item & mask2); + p = p << 1 | (evenparity32(*item & mask1)); + p = p << 1 | (evenparity32(*item & mask2)); *item = p << 24 | (*item & 0xffffff); } @@ -90,10 +90,10 @@ recover(uint32_t *o_head, uint32_t *o_tail, uint32_t oks, if (rem == -1) { for (e = e_head; e <= e_tail; ++e) { - *e = *e << 1 ^ evenparity32(*e & LF_POLY_EVEN) ^ !!(in & 4); + *e = *e << 1 ^ (evenparity32(*e & LF_POLY_EVEN)) ^ !!(in & 4); for (o = o_head; o <= o_tail; ++o, ++sl) { sl->even = *o; - sl->odd = *e ^ evenparity32(*o & LF_POLY_ODD); + sl->odd = *e ^ (evenparity32(*o & LF_POLY_ODD)); sl[1].odd = sl[1].even = 0; } }