diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-07-19 16:53:43 -0400 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-07-19 16:53:43 -0400 |
commit | 7dc6bd90c569c49807462b0740b18e32fab4d8b7 (patch) | |
tree | 1b6b4a3df6408992625f329206dbe98619589a17 /crypt/sha512.h | |
parent | e0e722848005e335132015a64a09cad7f7a12073 (diff) | |
download | glibc-7dc6bd90c569c49807462b0740b18e32fab4d8b7.tar.gz glibc-7dc6bd90c569c49807462b0740b18e32fab4d8b7.tar.xz glibc-7dc6bd90c569c49807462b0740b18e32fab4d8b7.zip |
Use union to avoid casts in code to store results of hashsum computations
Diffstat (limited to 'crypt/sha512.h')
-rw-r--r-- | crypt/sha512.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crypt/sha512.h b/crypt/sha512.h index 27dd717967..28d63fcfd3 100644 --- a/crypt/sha512.h +++ b/crypt/sha512.h @@ -44,7 +44,11 @@ struct sha512_ctx uint64_t total[2]; }; uint64_t buflen; - char buffer[256] __attribute__ ((__aligned__ (__alignof__ (uint64_t)))); + union + { + char buffer[256]; + uint64_t buffer64[32]; + }; }; /* Initialize structure containing state of computation. |