diff options
Diffstat (limited to 'ace/OS_NS_netdb.cpp')
-rw-r--r-- | ace/OS_NS_netdb.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ace/OS_NS_netdb.cpp b/ace/OS_NS_netdb.cpp index ea50e971279..b71914645dd 100644 --- a/ace/OS_NS_netdb.cpp +++ b/ace/OS_NS_netdb.cpp @@ -343,9 +343,7 @@ ACE_OS::getmacaddress (struct macaddr_node_t *node) ACE_OS::socket (PF_INET, SOCK_DGRAM, 0); if (handle == ACE_INVALID_HANDLE) - { - return -1; - } + return -1; ACE_OS::strcpy (ifr.ifr_name, "eth0"); @@ -358,6 +356,8 @@ ACE_OS::getmacaddress (struct macaddr_node_t *node) struct sockaddr* sa = (struct sockaddr *) &ifr.ifr_addr; + ACE_OS::close (handle); + ACE_OS::memcpy (node->node, sa->sa_data, 6); |