fs: namei: Use memcpy instead of strlcpy
PATCH 1/1 fs: namei: Use memcpy instead of strlcpy
If the string length is known, there is no need to use strlcpy. Use memcpy instead.
Signed-off-by Guenter Roeck <[email protected]>
---
Nitpick, but still a bit faster. Applies on top of -next.
fs/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/namei.c +1 -1
@@ -233,7 +233,7 @@ getname_kernel(const char * filename)__putname (result);return ERR_PTR (-ENAMETOOLONG ); } -strlcpy ((char *)result->name, filename, len); +memcpy ((char *)result->name, filename, len); result->uptr =NULL ; result->aname =NULL ; result->refcnt =1 ;
Signature · 1 line
2.1.0