summaryrefslogtreecommitdiff
path: root/cpp/src/IceUtil/Random.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IceUtil/Random.cpp')
-rw-r--r--cpp/src/IceUtil/Random.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/cpp/src/IceUtil/Random.cpp b/cpp/src/IceUtil/Random.cpp
index e82a55d93ab..d47d424357f 100644
--- a/cpp/src/IceUtil/Random.cpp
+++ b/cpp/src/IceUtil/Random.cpp
@@ -44,7 +44,7 @@ namespace
//
Mutex* staticMutex = 0;
#ifdef _WIN32
-HCRYPTPROV context = NULL;
+HCRYPTPROV context = 0;
#else
int fd = -1;
#endif
@@ -61,10 +61,10 @@ public:
~Init()
{
#ifdef _WIN32
- if(context != NULL)
+ if(context != 0)
{
CryptReleaseContext(context, 0);
- context = NULL;
+ context = 0;
}
#else
if(fd != -1)
@@ -102,7 +102,7 @@ IceUtilInternal::generateRandom(char* buffer, int size)
//
IceUtilInternal::MutexPtrLock<IceUtil::Mutex> lock(staticMutex);
- if(context == NULL)
+ if(context == 0)
{
if(!CryptAcquireContext(&context, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT))
{