diff options
Diffstat (limited to 'ACE/tests/Multihomed_INET_Addr_Test.cpp')
-rw-r--r-- | ACE/tests/Multihomed_INET_Addr_Test.cpp | 43 |
1 files changed, 19 insertions, 24 deletions
diff --git a/ACE/tests/Multihomed_INET_Addr_Test.cpp b/ACE/tests/Multihomed_INET_Addr_Test.cpp index 8c89f1fe7db..100bc588bb3 100644 --- a/ACE/tests/Multihomed_INET_Addr_Test.cpp +++ b/ACE/tests/Multihomed_INET_Addr_Test.cpp @@ -1,22 +1,19 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// tests -// -// = FILENAME -// Multihomed_INET_Addr_Test.cpp -// -// = DESCRIPTION -// Performs several tests on the Multihomed_ACE_INET_Addr class. -// It creates several IPv4 addresses and checks that the -// address formed by the class is valid. -// -// = AUTHOR -// Edward Mulholland (emulholl@atl.lmco.com) -// -// ============================================================================ + +//============================================================================= +/** + * @file Multihomed_INET_Addr_Test.cpp + * + * $Id$ + * + * Performs several tests on the Multihomed_ACE_INET_Addr class. + * It creates several IPv4 addresses and checks that the + * address formed by the class is valid. + * + * + * @author Edward Mulholland (emulholl@atl.lmco.com) + */ +//============================================================================= + #include "test_config.h" #include "ace/OS_NS_string.h" @@ -24,11 +21,8 @@ #include "ace/Log_Msg.h" #include "ace/OS_NS_arpa_inet.h" -int run_main (int argc, ACE_TCHAR *argv[]) +int run_main (int, ACE_TCHAR *[]) { - ACE_UNUSED_ARG (argc); - ACE_UNUSED_ARG (argv); - ACE_START_TEST (ACE_TEXT ("Multihomed_INET_Addr_Test")); int status = 0; // Innocent until proven guilty @@ -62,6 +56,7 @@ int run_main (int argc, ACE_TCHAR *argv[]) { struct in_addr addrv4; + ACE_OS::memset ((void *) &addrv4, 0, sizeof addrv4); ACE_OS::inet_pton (AF_INET, primary_dotted_decimal, &addrv4); ACE_OS::memcpy (&primary_addr32, &addrv4, sizeof (primary_addr32)); primary_addr32 = ACE_NTOHL(primary_addr32); @@ -69,6 +64,7 @@ int run_main (int argc, ACE_TCHAR *argv[]) for (i = 0; i < num_secondaries; ++i) { struct in_addr addrv4; + ACE_OS::memset ((void *) &addrv4, 0, sizeof addrv4); ACE_OS::inet_pton (AF_INET, secondary_dotted_decimals[i], &addrv4); ACE_OS::memcpy (&secondary_addr32[i], &addrv4, sizeof (primary_addr32)); secondary_addr32[i] = ACE_NTOHL(secondary_addr32[i]); @@ -466,5 +462,4 @@ int run_main (int argc, ACE_TCHAR *argv[]) ACE_END_TEST; return status; - } |