aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2011-03-04 02:28:52 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2011-03-04 02:28:52 -0500
commitf07ef1de9baeb2add514c51f59d4bc3c659c2ca4 (patch)
tree79a5de6a15dec6283cc58f3aeade4ea7fd435743 /crypto
parent442a4fffffa26fc3080350b4d50172f7589c3ac2 (diff)
crypto: tcrypt - do not attempt to write to readonly variable
Commit da7f033ddc9fdeb (”crypto: cryptomgr - Add test infrastructure”) added a const to variable which is later used as target buffer of memcpy. crypto/tcrypt.c:217:12: warning: passing 'const char (*)[128]' to parameter of type 'void *' discards qualifiers memset(&iv, 0xff, iv_len); crypto/tcrypt.c:test_cipher_speed() - unsigned char *key, iv[128]; + const char *key, iv[128]; ... memset(&iv, 0xff, iv_len); Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/tcrypt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
index 9aac5e58be94..e912ea5def3d 100644
--- a/crypto/tcrypt.c
+++ b/crypto/tcrypt.c
@@ -146,7 +146,8 @@ static void test_cipher_speed(const char *algo, int enc, unsigned int sec,
146 unsigned int tcount, u8 *keysize) 146 unsigned int tcount, u8 *keysize)
147{ 147{
148 unsigned int ret, i, j, iv_len; 148 unsigned int ret, i, j, iv_len;
149 const char *key, iv[128]; 149 const char *key;
150 char iv[128];
150 struct crypto_blkcipher *tfm; 151 struct crypto_blkcipher *tfm;
151 struct blkcipher_desc desc; 152 struct blkcipher_desc desc;
152 const char *e; 153 const char *e;