summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/UUID.cpp
diff options
context:
space:
mode:
authorjtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-01-27 19:44:49 +0000
committerjtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-01-27 19:44:49 +0000
commiteb17bf7f11e5f9df768e4951baf92da2566ddfd9 (patch)
tree7c5edd25e1ba9abeb35eefeab15cbecbcdcca9a0 /TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/UUID.cpp
parent0cc711b8c1613db64b11bba749b8840ded5431f8 (diff)
downloadATCD-eb17bf7f11e5f9df768e4951baf92da2566ddfd9.tar.gz
ChangeLogTag: Thu Jan 27 11:39:00 2005 J.T. Conklin <jtc@acorntoolworks.com>
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/UUID.cpp')
-rw-r--r--TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/UUID.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/UUID.cpp b/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/UUID.cpp
index f7aeb4119f5..217f701283e 100644
--- a/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/UUID.cpp
+++ b/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/UUID.cpp
@@ -66,7 +66,7 @@ UUID::from_string (const char *string_rep)
return false;
}
- rep_.uuid[offset++] = static_cast<unsigned char>(r);
+ rep_.uuid[offset++] = static_cast<unsigned char> (r);
string_rep += 2;
}
@@ -130,7 +130,7 @@ UUID::create (unsigned char *buffer)
// Days in years
static ACE_UINT64 SecondsToJan1970 =
- (static_cast<ACE_UINT64>(365)*(1970-1583) // Days in years
+ (static_cast<ACE_UINT64> (365)*(1970-1583) // Days in years
+ (1970-1583)/4 // Leap days
- 3 // Allow for 1700, 1800, 1900 not leap years
+ 31 // Days in December 1583
@@ -154,7 +154,7 @@ UUID::create (unsigned char *buffer)
buffer[7] = (unsigned char) (((timestamp >> 56) & 0x0f) + 0x10);
ACE_UINT16 clockSequence = static_cast<
- ACE_UINT16>(ACE_OS::rand_r(seed) & 0x2ff);
+ ACE_UINT16> (ACE_OS::rand_r(seed) & 0x2ff);
buffer[8] = (unsigned char) ((clockSequence >> 8) & 0x1f);
buffer[9] = (unsigned char) (clockSequence & 0x1f);