diff options
Diffstat (limited to 'cpp/src/IceUtil/UUID.cpp')
-rw-r--r-- | cpp/src/IceUtil/UUID.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cpp/src/IceUtil/UUID.cpp b/cpp/src/IceUtil/UUID.cpp index a692981b0e4..3db155164d9 100644 --- a/cpp/src/IceUtil/UUID.cpp +++ b/cpp/src/IceUtil/UUID.cpp @@ -10,8 +10,8 @@ #include <IceUtil/UUID.h> // On Windows, we use Windows's RPC UUID generator. -// On other platforms, we use a high quality random number generator -// (/dev/random) to generate "version 4" UUIDs, as described in +// On other platforms, we use a high quality random number generator +// (/dev/random) to generate "version 4" UUIDs, as described in // http://www.ietf.org/internet-drafts/draft-mealling-uuid-urn-00.txt #include <IceUtil/Random.h> @@ -43,7 +43,7 @@ namespace IceUtilInternal class PidInitializer { public: - + PidInitializer() { #ifndef _WIN32 @@ -75,7 +75,7 @@ inline void halfByteToHex(unsigned char hb, char*& hexBuffer) else { *hexBuffer++ = 'A' + (hb - 10); - } + } } inline void bytesToHex(unsigned char* bytes, size_t len, char*& hexBuffer) @@ -112,7 +112,7 @@ IceUtil::generateUUID() RpcStringFree(&str); return result; - + #else struct UUID { @@ -127,7 +127,7 @@ IceUtil::generateUUID() assert(sizeof(UUID) == 16); - // + // // Get a random sequence of bytes. Instead of using 122 random // bits that could be duplicated (because of a bug with some Linux // kernels and potentially other Unix platforms -- see comment in @@ -146,7 +146,7 @@ IceUtil::generateUUID() uuid.clockSeqHiAndReserved |= 0x80; // - // Replace the end of the node by myPid (15 bits) + // Replace the end of the node by myPid (15 bits) // uuid.node[4] = (uuid.node[4] & 0x80) | myPid[0]; uuid.node[5] = myPid[1]; |