Skip to content

Commit

Permalink
hostfs: Remove open coded strcpy()
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Weinberger <[email protected]>
  • Loading branch information
richardweinberger committed Mar 26, 2015
1 parent aad50b1 commit c278e81
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions fs/hostfs/hostfs_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit c278e81

Please sign in to comment.