From 76928d4f35100beb3f99f61134aa43f063621a2d Mon Sep 17 00:00:00 2001 From: levine Date: Wed, 3 Dec 1997 15:35:49 +0000 Subject: (inet_aton): return 0 if addr argument is 0 --- ace/OS.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ace/OS.cpp b/ace/OS.cpp index e72f3fe73e6..73305ba15f5 100644 --- a/ace/OS.cpp +++ b/ace/OS.cpp @@ -3032,17 +3032,18 @@ int ACE_OS::inet_aton (const char *host_name, struct in_addr *addr) { ACE_UINT32 ip_addr = ACE_OS::inet_addr (host_name); + if (ip_addr == (ACE_UINT32) htonl ((ACE_UINT32) ~0) // Broadcast addresses are weird... && ACE_OS::strcmp (host_name, "255.255.255.255") != 0) return 0; - else if (addr != 0) + else if (addr == 0) + return 0; + else { ACE_OS::memcpy ((void *) addr, (void *) &ip_addr, sizeof ip_addr); return 1; } - else - return 1; } ssize_t -- cgit v1.2.1