summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2005-06-22 13:26:36 -0700
committerDavid S. Miller <davem@davemloft.net>2005-06-22 13:26:36 -0700
commit3cc3816f93e3f94f88503da8e6090302fa986bd6 (patch)
tree4ff87e252277260f589836af0602c8e1fa6a99c4
parentef2736fc741316913a457abd3731053071c86241 (diff)
downloadlinux-stable-3cc3816f93e3f94f88503da8e6090302fa986bd6.tar.gz
linux-stable-3cc3816f93e3f94f88503da8e6090302fa986bd6.tar.bz2
linux-stable-3cc3816f93e3f94f88503da8e6090302fa986bd6.zip
[CRYPTO]: Kill unnecessary strncpy from tcrypt
It seems that bad code tends to get copied (see test_cipher_speed). So let's kill this idiom before it spreads any further. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--crypto/tcrypt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
index 5a95b4a14c2b..85a88a71ff53 100644
--- a/crypto/tcrypt.c
+++ b/crypto/tcrypt.c
@@ -266,16 +266,16 @@ static void test_cipher(char *algo, int mode, int enc,
char *key;
struct cipher_testvec *cipher_tv;
struct scatterlist sg[8];
- char e[11], m[4];
+ const char *e, *m;
if (enc == ENCRYPT)
- strncpy(e, "encryption", 11);
+ e = "encryption";
else
- strncpy(e, "decryption", 11);
+ e = "decryption";
if (mode == MODE_ECB)
- strncpy(m, "ECB", 4);
+ m = "ECB";
else
- strncpy(m, "CBC", 4);
+ m = "CBC";
printk("\ntesting %s %s %s\n", algo, m, e);