aboutsummaryrefslogtreecommitdiffstats
path: root/libkeccak_hmac_fast_update.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_fast_update.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_fast_update.c')
-rw-r--r--libkeccak_hmac_fast_update.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libkeccak_hmac_fast_update.c b/libkeccak_hmac_fast_update.c
index 5a1eb70..2f541d4 100644
--- a/libkeccak_hmac_fast_update.c
+++ b/libkeccak_hmac_fast_update.c
@@ -7,7 +7,7 @@
* without wiping sensitive data when possible
*
* @param state The hashing state
- * @param msg The partial message
+ * @param msg_ The partial message
* @param msglen The length of the partial message, in bytes
* @return Zero on success, -1 on error
*/
@@ -35,8 +35,10 @@ libkeccak_hmac_fast_update(struct libkeccak_hmac_state *restrict state, const vo
if (msglen != state->buffer_size) {
state->buffer = realloc(old = state->buffer, msglen);
- if (!state->buffer)
- return state->buffer = old, -1;
+ if (!state->buffer) {
+ state->buffer = old;
+ return -1;
+ }
state->buffer_size = msglen;
}