X-Git-Url: http://sjero.net/git/?a=blobdiff_plain;f=src%2Fgen_sslfunc.c;h=d9f1ceccbb1bd4a5f0e35aa9dfabba4ea8f99510;hb=5f0a2b3f0846dd4c2f72fc62e7171200d1fd6e06;hp=ec4204c7ac58c38498df7529e00919f80722c1f4;hpb=b2be7522c745827b521a8ed535201427df32eec7;p=wget diff --git a/src/gen_sslfunc.c b/src/gen_sslfunc.c index ec4204c7..d9f1cecc 100644 --- a/src/gen_sslfunc.c +++ b/src/gen_sslfunc.c @@ -149,8 +149,8 @@ ssl_printerrors (void) int ocerr = 0; unsigned long curerr = 0; char errbuff[1024]; - memset(errbuff, 0, sizeof(errbuff)); - while ( 0 != (curerr = ERR_get_error ())) + xzero (errbuff); + while ((curerr = ERR_get_error ()) != 0) { DEBUGP (("OpenSSL: %s\n", ERR_error_string (curerr, errbuff))); ++ocerr; @@ -317,8 +317,8 @@ ssl_iread (SSL *con, char *buf, int len) int res, fd; BIO_get_fd (con->rbio, &fd); #ifdef HAVE_SELECT - if (opt.timeout && !SSL_pending (con)) - if (select_fd (fd, opt.timeout, 0) <= 0) + if (opt.read_timeout && !SSL_pending (con)) + if (select_fd (fd, opt.read_timeout, 0) <= 0) return -1; #endif do @@ -343,8 +343,8 @@ ssl_iwrite (SSL *con, char *buf, int len) while (len > 0) { #ifdef HAVE_SELECT - if (opt.timeout) - if (select_fd (fd, opt.timeout, 1) <= 0) + if (opt.read_timeout) + if (select_fd (fd, opt.read_timeout, 1) <= 0) return -1; #endif do