mirror of
https://github.com/openssl/openssl.git
synced 2024-12-20 07:23:54 +08:00
It was just pointed out to me that it's better to cast to double...
This commit is contained in:
parent
fd836aeee0
commit
ec37635c94
@ -315,7 +315,7 @@ static void ssleay_rand_add(const void *buf, int num, double add)
|
||||
|
||||
static void ssleay_rand_seed(const void *buf, int num)
|
||||
{
|
||||
ssleay_rand_add(buf, num, (float)num);
|
||||
ssleay_rand_add(buf, num, (double)num);
|
||||
}
|
||||
|
||||
static int ssleay_rand_bytes(unsigned char *buf, int num)
|
||||
|
@ -233,7 +233,7 @@ int RAND_poll(void)
|
||||
#if defined(DEVRANDOM) || defined(DEVRANDOM_EGD)
|
||||
if (n > 0)
|
||||
{
|
||||
RAND_add(tmpbuf,sizeof tmpbuf,(float)n);
|
||||
RAND_add(tmpbuf,sizeof tmpbuf,(double)n);
|
||||
OPENSSL_cleanse(tmpbuf,n);
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user