summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlegacy/3945-mac.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2022-08-30 23:14:53 +0300
committerKalle Valo <kvalo@kernel.org>2022-09-02 11:47:22 +0300
commitbf99f11df4de45fcba6f6c441b411a16bccaccf6 (patch)
tree70ebf2dbad8e2b72723b728247ff692f58b35f2d /drivers/net/wireless/intel/iwlegacy/3945-mac.c
parent1dc13236ef9171a00168452d93ca70682c45ad30 (diff)
downloadlinux-bf99f11df4de45fcba6f6c441b411a16bccaccf6.tar.xz
wifi: 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: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220830201457.7984-2-wsa+renesas@sang-engineering.com
Diffstat (limited to 'drivers/net/wireless/intel/iwlegacy/3945-mac.c')
-rw-r--r--drivers/net/wireless/intel/iwlegacy/3945-mac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlegacy/3945-mac.c b/drivers/net/wireless/intel/iwlegacy/3945-mac.c
index 846138d6e33d..7352d5b2095f 100644
--- a/drivers/net/wireless/intel/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/intel/iwlegacy/3945-mac.c
@@ -3254,7 +3254,7 @@ il3945_store_measurement(struct device *d, struct device_attribute *attr,
if (count) {
char *p = buffer;
- strlcpy(buffer, buf, sizeof(buffer));
+ strscpy(buffer, buf, sizeof(buffer));
channel = simple_strtoul(p, NULL, 0);
if (channel)
params.channel = channel;