From: Richard Weinberger Date: Tue, 3 Mar 2015 22:42:25 +0000 (+0100) Subject: hostfs: Remove open coded strcpy() X-Git-Tag: v4.1-rc1~121^2~19 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c278e81b8a0291f5adce43c4613ad569d76dc384;p=karo-tx-linux.git hostfs: Remove open coded strcpy() Signed-off-by: Richard Weinberger --- 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; }