summaryrefslogtreecommitdiff
path: root/net/tipc/name_distr.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-02-02 18:44:47 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-08 15:03:41 +0300
commit02dc68829e5f2a9b48829725f332200ac3b051c2 (patch)
tree271cb3cde24274ded5195b1c60d6ea2d3f40e3b6 /net/tipc/name_distr.h
parentc29f9010a35604047f96a7e9d6cbabfa36d996d1 (diff)
downloadlinux-02dc68829e5f2a9b48829725f332200ac3b051c2.tar.xz
net: qed: use correct strncpy() size
commit 11f711081af0eb54190dc0de96ba4a9cd494666b upstream. passing the strlen() of the source string as the destination length is pointless, and gcc-8 now warns about it: drivers/net/ethernet/qlogic/qed/qed_debug.c: In function 'qed_grc_dump': include/linux/string.h:253: error: 'strncpy' specified bound depends on the length of the source argument [-Werror=stringop-overflow=] This changes qed_grc_dump_big_ram() to instead uses the length of the destination buffer, and use strscpy() to guarantee nul-termination. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/tipc/name_distr.h')
0 files changed, 0 insertions, 0 deletions