linux/drivers/isdn
Guenter Roeck 414372f633 TTY: isdn: Replace strncpy with memcpy
gcc 8.1.0 complains:

drivers/isdn/i4l/isdn_tty.c: In function 'isdn_tty_suspend.isra.1':
drivers/isdn/i4l/isdn_tty.c:790:3: warning:
	'strncpy' output truncated before terminating nul copying
	as many bytes from a string as its length
drivers/isdn/i4l/isdn_tty.c:778:6: note: length computed here

drivers/isdn/i4l/isdn_tty.c: In function 'isdn_tty_resume':
drivers/isdn/i4l/isdn_tty.c:880:3: warning:
	'strncpy' output truncated before terminating nul copying
	as many bytes from a string as its length
drivers/isdn/i4l/isdn_tty.c:817:6: 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>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-07-02 22:41:58 +09:00
..
capi treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
divert vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
gigaset isdn: gigaset: use usb_fill_int_urb() 2018-06-22 13:54:39 +09:00
hardware isdn: mISDN: use irqsave() in USB's complete callback 2018-06-22 13:54:39 +09:00
hisax isdn: hisax: st5481_usb: use usb_fill_int_urb() 2018-06-22 13:54:39 +09:00
hysdn isdn: replace ->proc_fops with ->proc_show 2018-05-16 07:24:30 +02:00
i4l TTY: isdn: Replace strncpy with memcpy 2018-07-02 22:41:58 +09:00
isdnloop isdnloop: Convert timers to use timer_setup() 2017-10-18 12:40:25 +01:00
mISDN treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
Kconfig
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00