aboutsummaryrefslogtreecommitdiffstats
path: root/init.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2019-02-10 11:28:30 +0100
committerMattias Andrée <maandree@kth.se>2019-02-10 11:28:30 +0100
commitd84edd9500e6e22ba49c76dc93a7c0731755d008 (patch)
tree5238a0362e0f70ea44fa40906c86102d5a50a4eb /init.c
parentFix warnings (diff)
downloadlibsha2-d84edd9500e6e22ba49c76dc93a7c0731755d008.tar.gz
libsha2-d84edd9500e6e22ba49c76dc93a7c0731755d008.tar.bz2
libsha2-d84edd9500e6e22ba49c76dc93a7c0731755d008.tar.xz
Fix libsha2_digest + minor improvements
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/init.c b/init.c
index 34eadb7..1d7f80b 100644
--- a/init.c
+++ b/init.c
@@ -103,7 +103,8 @@ libsha2_init(struct libsha2_state *restrict state, enum libsha2_algorithm algori
case LIBSHA2_512_224: memcpy(state->h.b64, H_512_224, sizeof(H_512_224)); break;
case LIBSHA2_512_256: memcpy(state->h.b64, H_512_256, sizeof(H_512_256)); break;
default:
- return errno = EINVAL, -1;
+ errno = EINVAL;
+ return -1;
}
/* Set round constants, and chunk size. */