aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.osdl.org>2004-01-29 16:41:00 -0800
committerLinus Torvalds <torvalds@home.osdl.org>2004-01-29 16:41:00 -0800
commitae05f3fae32be240b8792c48351eefedb128f1f9 (patch)
tree428a511cd0543dbb50ed3297b83ac0aa61b51ea5 /crypto
parent586a9edd0761e05d70c1711bfb3e778ecc7146bc (diff)
downloadhistory-ae05f3fae32be240b8792c48351eefedb128f1f9.tar.gz
Fix sha256 padding block initializer to be static.
Jakub points out that having an automatic array is not only bad for performance (and stack usage), gcc has also historically had lots of bugs here, and gcc-3.2.3 seems to miscompile it otherwise.
Diffstat (limited to 'crypto')
-rw-r--r--crypto/sha256.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/sha256.c b/crypto/sha256.c
index 030fe5cc6a644b..8122872e414f27 100644
--- a/crypto/sha256.c
+++ b/crypto/sha256.c
@@ -295,7 +295,7 @@ static void sha256_final(void* ctx, u8 *out)
u8 bits[8];
unsigned int index, pad_len, t;
int i, j;
- const u8 padding[64] = { 0x80, };
+ static const u8 padding[64] = { 0x80, };
/* Save number of bits */
t = sctx->count[0];