aboutsummaryrefslogtreecommitdiff
path: root/lib/ssluse.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-03-07 17:08:20 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-03-07 17:08:20 +0000
commit2873c18132cdc3de9996639ba7a872aafd56969e (patch)
tree0cd422379f9c3570bbd8d7b36dc79d927e828218 /lib/ssluse.c
parent5dd0a8a63ef66af148c40a07afa4dcc3816c1664 (diff)
removed compiler warning if HAVE_RAND_STATUS is false
Diffstat (limited to 'lib/ssluse.c')
-rw-r--r--lib/ssluse.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/ssluse.c b/lib/ssluse.c
index 8e43dd565..9823e6f84 100644
--- a/lib/ssluse.c
+++ b/lib/ssluse.c
@@ -35,6 +35,7 @@
#include "formdata.h" /* for the boundary function */
#ifdef USE_SSLEAY
+#include <openssl/rand.h>
static char global_passwd[64];
@@ -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?
@@ -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