mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 08:15:07 -04:00
smb: client: simplify __build_path_from_dentry_optional_prefix()
Use the convenient 'strreplace()' to simplify '__build_path_from_dentry_optional_prefix()'. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Paulo Alcantara <pc@manguebit.org>
This commit is contained in:
committed by
Paulo Alcantara
parent
730d0bb195
commit
3fffaa8a64
@@ -115,11 +115,7 @@ char *__build_path_from_dentry_optional_prefix(struct dentry *direntry, void *pa
|
||||
}
|
||||
if (dirsep != '/') {
|
||||
/* BB test paths to Windows with '/' in the midst of prepath */
|
||||
char *p;
|
||||
|
||||
for (p = s; *p; p++)
|
||||
if (*p == '/')
|
||||
*p = dirsep;
|
||||
strreplace(s, '/', dirsep);
|
||||
}
|
||||
if (dfsplen) {
|
||||
s -= dfsplen;
|
||||
|
||||
Reference in New Issue
Block a user