summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/IceUtil/Random.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/cpp/src/IceUtil/Random.cpp b/cpp/src/IceUtil/Random.cpp
index 3b80b45f020..f2927d35f64 100644
--- a/cpp/src/IceUtil/Random.cpp
+++ b/cpp/src/IceUtil/Random.cpp
@@ -29,7 +29,7 @@ IceUtil::RandomGeneratorException::RandomGeneratorException(const char* file, in
const char* IceUtil::RandomGeneratorException::_name = "IceUtil::RandomGeneratorException";
//
-// The static mutex is required to lazy initialized the file
+// The static mutex is required to lazy initialize the file
// descriptor for /dev/urandom (Unix) or the cryptographic
// context (Windows).
//
@@ -43,7 +43,7 @@ const char* IceUtil::RandomGeneratorException::_name = "IceUtil::RandomGenerator
//
static IceUtil::StaticMutex staticMutex = ICE_STATIC_MUTEX_INITIALIZER;
#ifdef _WIN32
-HCRYPTPROV context = NULL;
+static HCRYPTPROV context = NULL;
#else
static int fd = -1;
#endif
@@ -67,7 +67,6 @@ public:
context = NULL;
}
#else
- IceUtil::StaticMutex::Lock lock(staticMutex);
if(fd != -1)
{
close(fd);