Skip to content

Commit

Permalink
removed compiler warning if HAVE_RAND_STATUS is false
Browse files Browse the repository at this point in the history
  • Loading branch information
bagder committed Mar 7, 2001
1 parent 5dd0a8a commit 2873c18
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lib/ssluse.c
Expand Up @@ -35,6 +35,7 @@
#include "formdata.h" /* for the boundary function */

#ifdef USE_SSLEAY
#include <openssl/rand.h>

static char global_passwd[64];

Expand Down Expand Up @@ -78,7 +79,6 @@ static
int random_the_seed(struct connectdata *conn)
{
char *buf = conn->data->buffer; /* point to the big buffer */
int ret;
int nread=0;

/* Q: should we add support for a random file name as a libcurl option?
Expand Down Expand Up @@ -106,11 +106,13 @@ int random_the_seed(struct connectdata *conn)
#if defined(HAVE_RAND_EGD) && defined(EGD_SOCKET)
/* only available in OpenSSL 0.9.5 and later */
/* EGD_SOCKET is set at configure time */
ret = RAND_egd(EGD_SOCKET);
if(-1 != ret) {
nread += ret;
if(seed_enough(conn, nread))
return nread;
{
int ret = RAND_egd(EGD_SOCKET);
if(-1 != ret) {
nread += ret;
if(seed_enough(conn, nread))
return nread;
}
}
#endif

Expand Down

0 comments on commit 2873c18

Please sign in to comment.