diff options
author | Mattias Andrée <maandree@kth.se> | 2021-07-30 18:29:05 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-07-30 18:29:05 +0200 |
commit | 8af021382087293e2205eb15642346c6fdd30a59 (patch) | |
tree | 985a3f4217a55d2e6c46192d94a9ce94cee36ab2 /libkeccak_state_initialise.c | |
parent | Do not divide by sizeof(char) (diff) | |
download | libkeccak-8af021382087293e2205eb15642346c6fdd30a59.tar.gz libkeccak-8af021382087293e2205eb15642346c6fdd30a59.tar.bz2 libkeccak-8af021382087293e2205eb15642346c6fdd30a59.tar.xz |
Fix clang warnings
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | libkeccak_state_initialise.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/libkeccak_state_initialise.c b/libkeccak_state_initialise.c index aa77051..7644ff7 100644 --- a/libkeccak_state_initialise.c +++ b/libkeccak_state_initialise.c @@ -21,9 +21,17 @@ libkeccak_state_initialise(struct libkeccak_state *restrict state, const struct state->w = x = state->b / 25; state->l = 0; - if (x & 0xF0L) state->l |= 4, x >>= 4; - if (x & 0x0CL) state->l |= 2, x >>= 2; - if (x & 0x02L) state->l |= 1; + if (x & 0xF0L) { + state->l |= 4; + x >>= 4; + } + if (x & 0x0CL) { + state->l |= 2; + x >>= 2; + } + if (x & 0x02L) { + state->l |= 1; + } state->nr = 12 + (state->l << 1); state->wmod = (state->w == 64) ? ~0LL : (int64_t)((1ULL << state->w) - 1); |