diff options
author | Wolfram Sang | 2022-08-18 23:01:41 +0200 |
---|---|---|
committer | Steve French | 2022-08-19 11:02:26 -0500 |
commit | 13609a8b3ac6b0af38127a2b97fe62c0d06a8282 (patch) | |
tree | 271b2103936c97ea07493d70dbb56dea0f74ad1f /fs/cifs/cifsroot.c | |
parent | ca08d0eac020d48a3141dbec0a3cf64fbdb17cde (diff) |
cifs: 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: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/cifsroot.c')
-rw-r--r-- | fs/cifs/cifsroot.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/cifsroot.c b/fs/cifs/cifsroot.c index 9e91a5a40aae..56ec1b233f52 100644 --- a/fs/cifs/cifsroot.c +++ b/fs/cifs/cifsroot.c @@ -59,7 +59,7 @@ static int __init cifs_root_setup(char *line) pr_err("Root-CIFS: UNC path too long\n"); return 1; } - strlcpy(root_dev, line, len); + strscpy(root_dev, line, len); srvaddr = parse_srvaddr(&line[2], s); if (*s) { int n = snprintf(root_opts, |