diff options
author | Mattias Andrée <maandree@kth.se> | 2019-02-09 21:30:06 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2019-02-09 21:30:06 +0100 |
commit | ae42e15f211feb8625450e5dcc899ae29d885ba7 (patch) | |
tree | bddb7469da7d1f32502df31e0d7c0d57aee66fde /init.c | |
parent | Improve makefile: mv LIBEXT and LIBFLAGS to config.mk (diff) | |
download | libsha2-ae42e15f211feb8625450e5dcc899ae29d885ba7.tar.gz libsha2-ae42e15f211feb8625450e5dcc899ae29d885ba7.tar.bz2 libsha2-ae42e15f211feb8625450e5dcc899ae29d885ba7.tar.xz |
Fix warnings
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | init.c | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -107,18 +107,13 @@ libsha2_init(struct libsha2_state *restrict state, enum libsha2_algorithm algori } /* Set round constants, and chunk size. */ - switch (algorithm) { - case LIBSHA2_224: - case LIBSHA2_256: + if (algorithm <= LIBSHA2_256) { for (i = 0; i < 64; i++) state->k.b32[i] = (uint32_t)(ROUND_CONSTANTS[i] >> 32); state->chunk_size = 64; - break; - - default: + } else { memcpy(state->k.b64, ROUND_CONSTANTS, sizeof(ROUND_CONSTANTS)); state->chunk_size = 128; - break; } return 0; |