From abd10486462c1a1ff92b45ed083bca556deeb06c Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Tue, 22 Mar 2005 15:37:58 +0000 Subject: [PATCH] Cleanup some of the test areas. Add a memset to if.c so that purify and valgrind stop complaining about uninitialized memory. This commit was SVN r4988. --- src/util/if.c | 3 +++ test/mca/ns/Makefile.am | 16 ++++++++-------- test/mca/ns/{test_ns_proxy.c => ns_proxy.c} | 0 test/mca/ns/{test_ns_replica.c => ns_replica.c} | 0 4 files changed, 11 insertions(+), 8 deletions(-) rename test/mca/ns/{test_ns_proxy.c => ns_proxy.c} (100%) rename test/mca/ns/{test_ns_replica.c => ns_replica.c} (100%) diff --git a/src/util/if.c b/src/util/if.c index e0b9d62076..21fe4cba5c 100644 --- a/src/util/if.c +++ b/src/util/if.c @@ -126,6 +126,9 @@ static int ompi_ifinit(void) return OMPI_ERROR; } + /* initialize the memory so valgrind and purify won't complain */ + memset(ifconf.ifc_req, 0, ifc_len); + if(ioctl(sd, SIOCGIFCONF, &ifconf) < 0) { /* if we got an einval, we probably don't have enough space. so we'll fall down and try to expand our diff --git a/test/mca/ns/Makefile.am b/test/mca/ns/Makefile.am index 994be99912..d9fabf2ad6 100644 --- a/test/mca/ns/Makefile.am +++ b/test/mca/ns/Makefile.am @@ -17,24 +17,24 @@ include $(top_srcdir)/config/Makefile.options AM_CPPFLAGS = -I$(top_srcdir)/test/support -DOMPI_ENABLE_DEBUG_OVERRIDE=1 check_PROGRAMS = \ - test_ns_replica \ - test_ns_proxy \ + ns_replica \ + ns_proxy \ ns_nds TESTS = \ $(check_PROGRAMS) -test_ns_replica_SOURCES = test_ns_replica.c -test_ns_replica_LDADD = \ +ns_replica_SOURCES = ns_replica.c +ns_replica_LDADD = \ $(top_builddir)/test/support/libsupport.a \ $(top_builddir)/src/libmpi.la -test_ns_replica_DEPENDENCIES = $(test_ns_replica_LDADD) +ns_replica_DEPENDENCIES = $(ns_replica_LDADD) -test_ns_proxy_SOURCES = test_ns_proxy.c -test_ns_proxy_LDADD = \ +ns_proxy_SOURCES = ns_proxy.c +ns_proxy_LDADD = \ $(top_builddir)/test/support/libsupport.a \ $(top_builddir)/src/libmpi.la -test_ns_proxy_DEPENDENCIES = $(test_ns_proxy_LDADD) +ns_proxy_DEPENDENCIES = $(ns_proxy_LDADD) ns_nds_SOURCES = ns_nds.c ns_nds_LDADD = \ diff --git a/test/mca/ns/test_ns_proxy.c b/test/mca/ns/ns_proxy.c similarity index 100% rename from test/mca/ns/test_ns_proxy.c rename to test/mca/ns/ns_proxy.c diff --git a/test/mca/ns/test_ns_replica.c b/test/mca/ns/ns_replica.c similarity index 100% rename from test/mca/ns/test_ns_replica.c rename to test/mca/ns/ns_replica.c