Skip to content

Commit b7f28a3

Browse files
Wolfram Sangrichardweinberger
authored andcommitted
hostfs: 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 <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent e6e4d33 commit b7f28a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/hostfs/hostfs_kern.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ static char *__dentry_name(struct dentry *dentry, char *name)
103103
*/
104104
BUG_ON(p + strlen(p) + 1 != name + PATH_MAX);
105105

106-
strlcpy(name, root, PATH_MAX);
106+
strscpy(name, root, PATH_MAX);
107107
if (len > p - name) {
108108
__putname(name);
109109
return NULL;

0 commit comments

Comments
 (0)