Skip to content

Commit e174b12

Browse files
Wolfram Sangjarkkojs
authored andcommitted
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>
1 parent 4fe89d0 commit e174b12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/char/tpm/tpm_ppi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ void tpm_add_ppi(struct tpm_chip *chip)
380380
TPM_PPI_FN_VERSION,
381381
NULL, ACPI_TYPE_STRING);
382382
if (obj) {
383-
strlcpy(chip->ppi_version, obj->string.pointer,
383+
strscpy(chip->ppi_version, obj->string.pointer,
384384
sizeof(chip->ppi_version));
385385
ACPI_FREE(obj);
386386
}

0 commit comments

Comments
 (0)