diff options
author | Vladimir Zapolskiy <vz@mleia.com> | 2017-06-28 19:56:07 (GMT) |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2017-08-07 20:18:29 (GMT) |
commit | 0c17b1b79c3014f3abfe3fee1fa513ad271f4944 (patch) | |
tree | 2e301bd87b8cfb41e2614ed5afd876634006977c /net/cdp.h | |
parent | 2fd519f7770a2cd2200322ea5abd771ff4d3d07e (diff) | |
download | u-boot-fsl-qoriq-0c17b1b79c3014f3abfe3fee1fa513ad271f4944.tar.xz |
net: tftp: silence a subscript above array bounds compile time warning
For strncpy() select a minimal string length of destination and source
strings, here DEFAULT_NAME_LEN is preferable to MAX_LEN.
Due to the NUL-terminated contents of default_string the change is
a noop, however it removes a compilation warning if SH2/3/4 platform
specific strncpy() function is used:
In file included from include/linux/string.h:21:0,
from include/common.h:28,
from net/tftp.c:9:
net/tftp.c: In function 'tftp_start':
arch/sh/include/asm/string.h:52:42: warning: array subscript is above array bounds [-Warray-bounds]
: "0" (__dest), "1" (__src), "r" (__src+__n)
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'net/cdp.h')
0 files changed, 0 insertions, 0 deletions