mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Fix compiler warning in win32_urandom(): explicit cast to DWORD in
CryptGenRandom()
This commit is contained in:
parent
f558778f07
commit
0c083461a5
1 changed files with 1 additions and 1 deletions
|
@ -50,7 +50,7 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise)
|
||||||
while (size > 0)
|
while (size > 0)
|
||||||
{
|
{
|
||||||
chunk = size > INT_MAX ? INT_MAX : size;
|
chunk = size > INT_MAX ? INT_MAX : size;
|
||||||
if (!CryptGenRandom(hCryptProv, chunk, buffer))
|
if (!CryptGenRandom(hCryptProv, (DWORD)chunk, buffer))
|
||||||
{
|
{
|
||||||
/* CryptGenRandom() failed */
|
/* CryptGenRandom() failed */
|
||||||
if (raise)
|
if (raise)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue