diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2022-08-19 00:00:57 +0300 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2022-08-26 12:56:56 +0300 |
commit | 9c9ac2e659e1b009d16a1f43d8ca26abcf17e0bb (patch) | |
tree | f80165d59cc056accca5615df5456715d1a7b2ff /drivers/platform/x86/dell | |
parent | 8028d5d481ebed904388e7248deea1f3620511eb (diff) | |
download | linux-9c9ac2e659e1b009d16a1f43d8ca26abcf17e0bb.tar.xz |
platform/x86: 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>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com>
Link: https://lore.kernel.org/r/20220818210058.7229-1-wsa+renesas@sang-engineering.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform/x86/dell')
-rw-r--r-- | drivers/platform/x86/dell/dell-wmi-sysman/sysman.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c b/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c index 636bdfa83284..0a6411a8a104 100644 --- a/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c +++ b/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c @@ -270,7 +270,7 @@ void strlcpy_attr(char *dest, char *src) size_t len = strlen(src) + 1; if (len > 1 && len <= MAX_BUFF) - strlcpy(dest, src, len); + strscpy(dest, src, len); /*len can be zero because any property not-applicable to attribute can * be empty so check only for too long buffers and log error |