summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2015-03-04 01:42:25 +0300
committerRichard Weinberger <richard@nod.at>2015-03-27 01:27:50 +0300
commitc278e81b8a0291f5adce43c4613ad569d76dc384 (patch)
tree02c30363637bb468fe7fe3df676299b08bc59ec7 /fs
parentaad50b1e06081de0e4ff25335ab6f52e58bfcef1 (diff)
downloadlinux-c278e81b8a0291f5adce43c4613ad569d76dc384.tar.xz
hostfs: Remove open coded strcpy()
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs')
-rw-r--r--fs/hostfs/hostfs_kern.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
index 3082a7e715dd..7260f162db41 100644
--- a/fs/hostfs/hostfs_kern.c
+++ b/fs/hostfs/hostfs_kern.c
@@ -105,11 +105,10 @@ static char *__dentry_name(struct dentry *dentry, char *name)
__putname(name);
return NULL;
}
- if (p > name + len) {
- char *s = name + len;
- while ((*s++ = *p++) != '\0')
- ;
- }
+
+ if (p > name + len)
+ strcpy(name + len, p);
+
return name;
}