It was just pointed out to me that it's better to cast to double...
authorRichard Levitte <levitte@openssl.org>
Mon, 15 Mar 2004 23:02:55 +0000 (23:02 +0000)
committerRichard Levitte <levitte@openssl.org>
Mon, 15 Mar 2004 23:02:55 +0000 (23:02 +0000)
crypto/rand/md_rand.c
crypto/rand/rand_unix.c

index 303e5898c498e22008174ec82357445161fc00f8..87fd9455e2071fe43f0feb3260af8697d7830775 100644 (file)
@@ -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)
index aef6914bb1a23061354b07e79f905139a8b202be..d2fdb35b56fea84cd3a99e01d7d1ce7511cf6553 100644 (file)
@@ -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