Commit 3cc3816f authored by Herbert Xu's avatar Herbert Xu Committed by David S. Miller

[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: default avatarHerbert Xu <>
Signed-off-by: default avatarDavid S. Miller <>
parent ef2736fc
......@@ -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";
strncpy(e, "decryption", 11);
e = "decryption";
if (mode == MODE_ECB)
strncpy(m, "ECB", 4);
m = "ECB";
strncpy(m, "CBC", 4);
m = "CBC";
printk("\ntesting %s %s %s\n", algo, m, e);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment