summaryrefslogtreecommitdiff
path: root/ace/UNIX_Addr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ace/UNIX_Addr.cpp')
-rw-r--r--ace/UNIX_Addr.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/ace/UNIX_Addr.cpp b/ace/UNIX_Addr.cpp
index 91bcaf945d3..34c3013b025 100644
--- a/ace/UNIX_Addr.cpp
+++ b/ace/UNIX_Addr.cpp
@@ -34,18 +34,18 @@ ACE_UNIX_Addr::dump (void) const
// Do nothing constructor.
ACE_UNIX_Addr::ACE_UNIX_Addr (void)
+ : ACE_Addr (AF_UNIX, sizeof this->unix_addr_)
{
(void) ACE_OS::memset ((void *) &this->unix_addr_,
0,
sizeof this->unix_addr_);
-
- this->unix_addr_.sun_family = AF_UNIX;
- this->base_set (AF_UNIX, sizeof this->unix_addr_);
}
int
ACE_UNIX_Addr::set (const ACE_UNIX_Addr &sa)
{
+ this->base_set (sa.get_type (), sa.get_size ());
+
if (sa.get_type () == AF_ANY)
(void) ACE_OS::memset ((void *) &this->unix_addr_,
0,
@@ -53,10 +53,6 @@ ACE_UNIX_Addr::set (const ACE_UNIX_Addr &sa)
else
ACE_OS::strcpy (this->unix_addr_.sun_path,
sa.unix_addr_.sun_path);
-
- this->unix_addr_.sun_family = AF_UNIX;
- this->base_set (sa.get_type (), sa.get_size ());
-
return 0;
}