Test always fails with TBROK because inner loop will reset all the previous set values if we use else branch.
Fixes 7cfe1586b8ed ("sctp: sctputil.c: make 'found' a static array") Signed-off-by: Alexey Kodanev <alexey.koda...@oracle.com> --- utils/sctp/testlib/sctputil.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/utils/sctp/testlib/sctputil.c b/utils/sctp/testlib/sctputil.c index c678072..564925c 100644 --- a/utils/sctp/testlib/sctputil.c +++ b/utils/sctp/testlib/sctputil.c @@ -371,6 +371,7 @@ int test_peer_addr(int sk, sctp_assoc_t asoc, sockaddr_storage_t *peers, int cou socklen_t addrs_size = 0; void *addrbuf; char found[count]; + memset(found, 0, count); error = sctp_getpaddrs(sk, asoc, &addrs); if (-1 == error) { @@ -404,8 +405,6 @@ int test_peer_addr(int sk, sctp_assoc_t asoc, sockaddr_storage_t *peers, int cou if (cmp_addr((sockaddr_storage_t *)sa_addr, &peers[j]) == 0) { found[j] = 1; - } else { - found[j] = 0; } } } -- 1.7.1 ------------------------------------------------------------------------------ Monitor 25 network devices or servers for free with OpManager! OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list