From a03e3ba41b9c043bf71ad7d3ae1043e7f7157cde Mon Sep 17 00:00:00 2001 From: Moinak Ghosh Date: Mon, 28 Jan 2013 00:51:47 +0530 Subject: [PATCH] Fix return from parallel versions of Keccak_Hash() function. --- crypto/sha3_utils.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crypto/sha3_utils.c b/crypto/sha3_utils.c index c967c69..836329b 100644 --- a/crypto/sha3_utils.c +++ b/crypto/sha3_utils.c @@ -55,8 +55,7 @@ Keccak256_par(uchar_t *cksum_buf, uchar_t *buf, uint64_t bytes) * If not then just do a simple serial hashing. */ if (bytes / 2 <= KECCAK_BLOCK_SIZE * 2) { - Keccak_Hash(256, buf, bytes * 8, cksum_buf); - return; + return (Keccak_Hash(256, buf, bytes * 8, cksum_buf)); } pos[0] = buf; len[0] = bytes/2; @@ -93,8 +92,7 @@ Keccak512_par(uchar_t *cksum_buf, uchar_t *buf, uint64_t bytes) * If not then just do a simple serial hashing. */ if (bytes / 2 <= KECCAK_BLOCK_SIZE * 2) { - Keccak_Hash(512, buf, bytes * 8, cksum_buf); - return; + return (Keccak_Hash(512, buf, bytes * 8, cksum_buf)); } pos[0] = buf; len[0] = bytes/2;