linux/fs/kernfs
Guenter Roeck 166126c1e5 kernfs: Replace strncpy with memcpy
gcc 8.1.0 complains:

fs/kernfs/symlink.c:91:3: warning:
	'strncpy' output truncated before terminating nul copying
	as many bytes from a string as its length
fs/kernfs/symlink.c: In function 'kernfs_iop_get_link':
fs/kernfs/symlink.c:88:14: note: length computed here

Using strncpy() is indeed less than perfect since the length of data to
be copied has already been determined with strlen(). Replace strncpy()
with memcpy() to address the warning and optimize the code a little.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-07 09:57:10 +02:00
..
dir.c vfs: change inode times to use struct timespec64 2018-06-05 16:57:31 -07:00
file.c fs: kernfs: Adding new return type vm_fault_t 2018-04-23 13:52:34 +02:00
inode.c vfs: change inode times to use struct timespec64 2018-06-05 16:57:31 -07:00
Kconfig kernfs: add CONFIG_KERNFS 2014-02-07 16:08:57 -08:00
kernfs-internal.h kernfs: don't set dentry->d_fsdata 2017-07-29 09:00:03 -06:00
Makefile
mount.c kernfs: deal with kernfs_fill_super() failures 2018-05-21 14:30:08 -04:00
symlink.c kernfs: Replace strncpy with memcpy 2018-07-07 09:57:10 +02:00