diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2010-01-13 08:47:38 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2010-01-13 08:47:38 +0000 |
commit | e8bfcd658288471e4eb03da9c9d476a39415eaa9 (patch) | |
tree | db949d11cdd326f224daed23a800226c8edfea95 /ACE/ace/UUID.cpp | |
parent | 50622bdb99f23e0a22b9c0cb33f7216f099f82e9 (diff) | |
download | ATCD-e8bfcd658288471e4eb03da9c9d476a39415eaa9.tar.gz |
Wed Jan 13 06:45:19 UTC 2010 Johnny Willemsen <jwillemsen@remedy.nl>
* ace/os_include/sys/os_types.h:
* ace/OS_NS_arpa_inet.cpp:
* ace/OS_NS_unistd.inl:
VxWorks 6.8 fixes
* ace/UUID.cpp:
Only one exit point for operator=, const change, initialise pointer with 0
Diffstat (limited to 'ACE/ace/UUID.cpp')
-rw-r--r-- | ACE/ace/UUID.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/ACE/ace/UUID.cpp b/ACE/ace/UUID.cpp index 1690bfcd41f..c39121a1f39 100644 --- a/ACE/ace/UUID.cpp +++ b/ACE/ace/UUID.cpp @@ -36,24 +36,24 @@ namespace ACE_Utils const UUID & UUID::operator = (const UUID & rhs) { - if (this == &rhs) - return *this; - - // Reset the string version of the UUID a string version - // exist, and the UUID is not equal to the old UUID. - if (0 != this->as_string_.get ()) + if (this != &rhs) { - if (0 == rhs.as_string_.get () || *this != rhs) - this->as_string_.reset (); - } + // Reset the string version of the UUID a string version + // exist, and the UUID is not equal to the old UUID. + if (0 != this->as_string_.get ()) + { + if (0 == rhs.as_string_.get () || *this != rhs) + this->as_string_.reset (); + } - // Copy the contents of the UUID. - ACE_OS::memcpy (&this->uuid_, &rhs.uuid_, BINARY_SIZE); + // Copy the contents of the UUID. + ACE_OS::memcpy (&this->uuid_, &rhs.uuid_, BINARY_SIZE); - /// @todo We should create an UUID_Ex class for UUIDs that - /// contain the thread id and process id. - this->thr_id_ = rhs.thr_id_; - this->pid_ = rhs.pid_; + /// @todo We should create an UUID_Ex class for UUIDs that + /// contain the thread id and process id. + this->thr_id_ = rhs.thr_id_; + this->pid_ = rhs.pid_; + } return *this; } @@ -315,7 +315,7 @@ namespace ACE_Utils return; ACE_OS::macaddr_node_t macaddress; - int result = ACE_OS::getmacaddress (&macaddress); + int const result = ACE_OS::getmacaddress (&macaddress); UUID_Node::Node_ID node_id; @@ -393,7 +393,7 @@ namespace ACE_Utils UUID* UUID_Generator::generate_UUID (ACE_UINT16 version, u_char variant) { - UUID* uuid; + UUID* uuid = 0; ACE_NEW_RETURN (uuid, UUID, 0); |