Windows: Fix type cast warning.
Since at least SDK V6.1 HCRYPTPROV has been specified as ULONG_PTR this means that comparing or setting one with NULL causes a cast warning. Use an explicit cast from zero to that type.
This commit is contained in:

committed by
Luke Howard

parent
cc7610b77c
commit
7b8fa4758c
@@ -41,15 +41,15 @@
|
|||||||
|
|
||||||
#include "randi.h"
|
#include "randi.h"
|
||||||
|
|
||||||
volatile static HCRYPTPROV g_cryptprovider = NULL;
|
volatile static HCRYPTPROV g_cryptprovider;
|
||||||
|
|
||||||
static HCRYPTPROV
|
static HCRYPTPROV
|
||||||
_hc_CryptProvider(void)
|
_hc_CryptProvider(void)
|
||||||
{
|
{
|
||||||
BOOL rv;
|
BOOL rv;
|
||||||
HCRYPTPROV cryptprovider = NULL;
|
HCRYPTPROV cryptprovider = (HCRYPTPROV)0;
|
||||||
|
|
||||||
if (g_cryptprovider != NULL)
|
if (g_cryptprovider)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
rv = CryptAcquireContext(&cryptprovider, NULL,
|
rv = CryptAcquireContext(&cryptprovider, NULL,
|
||||||
|
Reference in New Issue
Block a user