diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2022-08-18 23:59:59 +0300 |
---|---|---|
committer | Jarkko Sakkinen <jarkko@kernel.org> | 2022-10-05 00:25:56 +0300 |
commit | e174b1273ef97d090ef85cb09a6bfdc10ea8dcf6 (patch) | |
tree | e9354bdda642663f24eb0693e6814e89c7e90d41 /drivers/char | |
parent | 4fe89d07dcc2804c8b562f6c7896a45643d34b2f (diff) | |
download | linux-e174b1273ef97d090ef85cb09a6bfdc10ea8dcf6.tar.xz |
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>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/tpm/tpm_ppi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/tpm/tpm_ppi.c b/drivers/char/tpm/tpm_ppi.c index 40018a73b3cb..bc7b1b4501b3 100644 --- a/drivers/char/tpm/tpm_ppi.c +++ b/drivers/char/tpm/tpm_ppi.c @@ -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); } |