]> sjero.net Git - wget/blobdiff - src/gen_sslfunc.c
[svn] Use new macros xnew, xnew0, xnew_array, and xnew0_array in various places.
[wget] / src / gen_sslfunc.c
index ec4204c7ac58c38498df7529e00919f80722c1f4..d9f1ceccbb1bd4a5f0e35aa9dfabba4ea8f99510 100644 (file)
@@ -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