crypto: essiv - Remove unnecessary strscpy() size argument
authorThorsten Blum <thorsten.blum@linux.dev>
Tue, 8 Apr 2025 11:22:59 +0000 (13:22 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 16 Apr 2025 07:16:22 +0000 (15:16 +0800)
If the destination buffer has a fixed length, strscpy() automatically
determines its size using sizeof() when the argument is omitted. This
makes the explicit size argument unnecessary - remove it.

No functional changes intended.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/essiv.c

index ec0ec8992c2da5bf2c29a34dc8c22514894b2fec..cfce8ef7ab1fa83ae81c71926d7ffba9521a4e09 100644 (file)
@@ -548,8 +548,7 @@ static int essiv_create(struct crypto_template *tmpl, struct rtattr **tb)
        }
 
        /* record the driver name so we can instantiate this exact algo later */
-       strscpy(ictx->shash_driver_name, hash_alg->base.cra_driver_name,
-               CRYPTO_MAX_ALG_NAME);
+       strscpy(ictx->shash_driver_name, hash_alg->base.cra_driver_name);
 
        /* Instance fields */