aboutsummaryrefslogtreecommitdiffstats
path: root/update.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2019-02-09 21:30:06 +0100
committerMattias Andrée <maandree@kth.se>2019-02-09 21:30:06 +0100
commitae42e15f211feb8625450e5dcc899ae29d885ba7 (patch)
treebddb7469da7d1f32502df31e0d7c0d57aee66fde /update.c
parentImprove makefile: mv LIBEXT and LIBFLAGS to config.mk (diff)
downloadlibsha2-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 'update.c')
-rw-r--r--update.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/update.c b/update.c
index 26eceb8..3263b62 100644
--- a/update.c
+++ b/update.c
@@ -122,16 +122,10 @@ libsha2_update(struct libsha2_state *restrict state, const char *restrict messag
n = n < msglen ? n : msglen;
memcpy(state->chunk + off, message, n);
if (off + n == state->chunk_size) {
- switch (state->algorithm) {
- case LIBSHA2_224:
- case LIBSHA2_256:
+ if (state->algorithm <= LIBSHA2_256)
process256(state);
- break;
-
- default:
+ else
process512(state);
- break;
- }
}
message += n, mlen += n, msglen -= n;
}