mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-05 20:04:31 -05:00
char: move from strlcpy with unused retval to strscpy
Follow the advice of the below link and prefer 'strscpy' in this subsystem. Conversion is 1:1 because the return value is not used. Generated by a coccinelle script. Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
This commit is contained in:
committed by
Jarkko Sakkinen
parent
4fe89d07dc
commit
e174b1273e
@@ -380,7 +380,7 @@ void tpm_add_ppi(struct tpm_chip *chip)
|
||||
TPM_PPI_FN_VERSION,
|
||||
NULL, ACPI_TYPE_STRING);
|
||||
if (obj) {
|
||||
strlcpy(chip->ppi_version, obj->string.pointer,
|
||||
strscpy(chip->ppi_version, obj->string.pointer,
|
||||
sizeof(chip->ppi_version));
|
||||
ACPI_FREE(obj);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user