diff options
author | Richard Weinberger <richard@nod.at> | 2015-03-04 01:42:25 +0300 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2015-03-27 01:27:50 +0300 |
commit | c278e81b8a0291f5adce43c4613ad569d76dc384 (patch) | |
tree | 02c30363637bb468fe7fe3df676299b08bc59ec7 /fs | |
parent | aad50b1e06081de0e4ff25335ab6f52e58bfcef1 (diff) | |
download | linux-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.c | 9 |
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; } |