A couple more cases where RAND_add() gets an integer instead of a
doule as last argument.
This commit is contained in:
parent
a87228031f
commit
a481b4b52c
@ -104,7 +104,7 @@ int RAND_load_file(const char *file, long bytes)
|
|||||||
|
|
||||||
i=stat(file,&sb);
|
i=stat(file,&sb);
|
||||||
/* If the state fails, put some crap in anyway */
|
/* If the state fails, put some crap in anyway */
|
||||||
RAND_add(&sb,sizeof(sb),0);
|
RAND_add(&sb,sizeof(sb),0.0);
|
||||||
if (i < 0) return(0);
|
if (i < 0) return(0);
|
||||||
if (bytes == 0) return(ret);
|
if (bytes == 0) return(ret);
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ int RAND_load_file(const char *file, long bytes)
|
|||||||
i=fread(buf,1,n,in);
|
i=fread(buf,1,n,in);
|
||||||
if (i <= 0) break;
|
if (i <= 0) break;
|
||||||
/* even if n != i, use the full array */
|
/* even if n != i, use the full array */
|
||||||
RAND_add(buf,n,i);
|
RAND_add(buf,n,(double)i);
|
||||||
ret+=i;
|
ret+=i;
|
||||||
if (bytes > 0)
|
if (bytes > 0)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user