From 60b3090a54a7c55e7425c8523dab05b790dd664d Mon Sep 17 00:00:00 2001 From: Jon Griffiths Date: Wed, 23 Mar 2016 11:49:48 +1300 Subject: [PATCH 1/1] sha256: Make our u32 and u8 fields the same size These are just aliases to a buffer: its customary for these to have the same size, and makes sizeof() consistent in case anyone decides to use the members instead of the containing union. Signed-off-by: Jon Griffiths --- ccan/crypto/sha256/sha256.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccan/crypto/sha256/sha256.h b/ccan/crypto/sha256/sha256.h index eedaa94e..3e1a4919 100644 --- a/ccan/crypto/sha256/sha256.h +++ b/ccan/crypto/sha256/sha256.h @@ -49,7 +49,7 @@ struct sha256_ctx { uint32_t s[8]; uint64_t bytes; union { - uint32_t u32[8]; + uint32_t u32[16]; unsigned char u8[64]; } buf; #endif -- 2.39.2