mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 14:33:24 -04:00
crypto: ccp - use 2-arg strscpy where destination size is known
To simplify the code, drop explicit and hard-coded size arguments from strscpy() where the destination buffer has a fixed size and strscpy() can automatically determine it using sizeof(). Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
committed by
Herbert Xu
parent
3c181f71cd
commit
3c6ec632bc
@@ -426,7 +426,7 @@ static int ccp_register_hmac_alg(struct list_head *head,
|
||||
*ccp_alg = *base_alg;
|
||||
INIT_LIST_HEAD(&ccp_alg->entry);
|
||||
|
||||
strscpy(ccp_alg->child_alg, def->name, CRYPTO_MAX_ALG_NAME);
|
||||
strscpy(ccp_alg->child_alg, def->name);
|
||||
|
||||
alg = &ccp_alg->alg;
|
||||
alg->setkey = ccp_sha_setkey;
|
||||
|
||||
Reference in New Issue
Block a user