From: Jon Griffiths Date: Tue, 22 Mar 2016 22:49:48 +0000 (+1300) Subject: sha256: Make our u32 and u8 fields the same size X-Git-Url: http://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=60b3090a54a7c55e7425c8523dab05b790dd664d;hp=cedcaa1bbb44cad610973c449340c0fde9ae0280 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 --- 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