diff options
author | Aaron Conole <aconole@redhat.com> | 2018-06-13 15:43:03 -0400 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-06-14 13:22:24 -0700 |
commit | 3df52f3d14e8cab704a918dd92e076804c0815e1 (patch) | |
tree | d46962e45d2150a612b7c00da7280536fd1f2274 /tests/automake.mk | |
parent | 0e2751ed7f0039471ae6457de8fc1d6bda8b037a (diff) | |
download | openvswitch-3df52f3d14e8cab704a918dd92e076804c0815e1.tar.gz |
lldp: fix string warnings
lib/lldp/lldpd.c: In function :
lib/lldp/lldpd.c:520:17: warning: output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
strncat(buffer, cfg->g_protocols[i].name,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
strlen(cfg->g_protocols[i].name));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/lldp/lldpd.c: In function :
lib/lldp/lldpd.c:519:17: warning: specified bound 2 equals source length [-Wstringop-overflow=]
strncat(buffer, ", ", 2);
^~~~~~~~~~~~~~~~~~~~~~~~
Closer inspection shows that buffer is only used to output protocol names
when debug logging is enabled, so restructure the code a bit as well.
Signed-off-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'tests/automake.mk')
0 files changed, 0 insertions, 0 deletions