aboutsummaryrefslogtreecommitdiffstats
path: root/libkeccak_hmac_set_key.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-07-30 18:29:05 +0200
committerMattias Andrée <maandree@kth.se>2021-07-30 18:29:05 +0200
commit8af021382087293e2205eb15642346c6fdd30a59 (patch)
tree985a3f4217a55d2e6c46192d94a9ce94cee36ab2 /libkeccak_hmac_set_key.c
parentDo not divide by sizeof(char) (diff)
downloadlibkeccak-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 'libkeccak_hmac_set_key.c')
-rw-r--r--libkeccak_hmac_set_key.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libkeccak_hmac_set_key.c b/libkeccak_hmac_set_key.c
index b056439..60ef775 100644
--- a/libkeccak_hmac_set_key.c
+++ b/libkeccak_hmac_set_key.c
@@ -23,8 +23,10 @@ libkeccak_hmac_set_key(struct libkeccak_hmac_state *restrict state, const void *
if (size != key_bytes) {
state->key_opad = realloc(old = state->key_opad, 2 * size);
- if (!state->key_opad)
- return state->key_opad = old, -1;
+ if (!state->key_opad) {
+ state->key_opad = old;
+ return -1;
+ }
state->key_ipad = state->key_opad + size;
}