diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2022-08-18 23:01:39 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-08-19 13:03:10 +0200 |
commit | 505ffcc852401aaac4dfb57c16bec0f7838c0e00 (patch) | |
tree | 072f39f02c5a31c3bf05cd789f4c1aa5c81035a5 /fs/affs | |
parent | 5abbb7b92820cf6ba9154a35cff6d64b62d7f273 (diff) | |
download | lwn-505ffcc852401aaac4dfb57c16bec0f7838c0e00.tar.gz lwn-505ffcc852401aaac4dfb57c16bec0f7838c0e00.zip |
affs: 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: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/affs')
-rw-r--r-- | fs/affs/super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/affs/super.c b/fs/affs/super.c index 4c5f30a83336..58b391446ae1 100644 --- a/fs/affs/super.c +++ b/fs/affs/super.c @@ -276,7 +276,7 @@ parse_options(char *options, kuid_t *uid, kgid_t *gid, int *mode, int *reserved, char *vol = match_strdup(&args[0]); if (!vol) return 0; - strlcpy(volume, vol, 32); + strscpy(volume, vol, 32); kfree(vol); break; } |