changeset 1386:8f6d5a94ac0e

s/retval/ret/g
author Jorge Arellano Cid <jcid@dillo.org>
date Sun, 01 Nov 2009 16:31:59 -0300
parents eb98997886ec
children 16cf380cd04c
files dpi/dpiutil.c dpi/https.c dpid/dpid.c src/IO/dpi.c
diffstat 4 files changed, 36 insertions(+), 36 deletions(-) [+]
line wrap: on
line diff
--- a/dpi/dpiutil.c	Sun Nov 01 16:31:59 2009 -0300
+++ b/dpi/dpiutil.c	Sun Nov 01 16:31:59 2009 -0300
@@ -194,7 +194,7 @@
 int sock_handler_write(SockHandler *sh, int flush,
                        const char *Data, size_t DataSize)
 {
-   int retval = 1;
+   int ret = 1;
 
    /* append to buf */
    while (sh->buf_max < sh->buf_sz + DataSize) {
@@ -219,7 +219,7 @@
    }
    if (i == sh->buf_sz) {
       sh->buf_sz = 0;
-      retval = 0;
+      ret = 0;
    }
 }
 #else
@@ -230,14 +230,14 @@
       } else {
          fflush(sh->out);
          sh->buf_sz = 0;
-         retval = 0;
+         ret = 0;
       }
 
    } else {
-      retval = 0;
+      ret = 0;
    }
 #endif
-   return retval;
+   return ret;
 }
 
 /*
--- a/dpi/https.c	Sun Nov 01 16:31:59 2009 -0300
+++ b/dpi/https.c	Sun Nov 01 16:31:59 2009 -0300
@@ -132,7 +132,7 @@
    char *dpip_tag = NULL, *cmd = NULL, *url = NULL, *http_query = NULL,
         *proxy_url = NULL, *proxy_connect = NULL;
    char buf[4096];
-   int retval = 0;
+   int ret = 0;
    int network_socket = -1;
 
 
@@ -309,9 +309,9 @@
 
       /*Send remaining data*/
 
-      while ((retval = SSL_read(ssl_connection, buf, 4096)) > 0 ){
+      while ((ret = SSL_read(ssl_connection, buf, 4096)) > 0 ){
          /* flush is good for dialup speed */
-         sock_handler_write(sh, 1, buf, (size_t)retval);
+         sock_handler_write(sh, 1, buf, (size_t)ret);
       }
    }
 
@@ -414,7 +414,7 @@
 static int handle_certificate_problem(SSL * ssl_connection)
 {
    int response_number;
-   int retval = -1;
+   int ret = -1;
    long st;
    char *cn, *cn_end;
    char buf[4096], *d_cmd, *msg;
@@ -439,7 +439,7 @@
 
       /*Abort on anything but "Continue"*/
       if (response_number == 1){
-         retval = 0;
+         ret = 0;
       }
 
    } else {
@@ -447,7 +447,7 @@
       st = SSL_get_verify_result(ssl_connection);
       switch (st) {
       case X509_V_OK:      /*Everything is Kosher*/
-         retval = 0;
+         ret = 0;
          break;
       case X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT:
          /*Either self signed and untrusted*/
@@ -476,7 +476,7 @@
          response_number = dialog_get_answer_number();
          switch (response_number){
             case 1:
-               retval = 0;
+               ret = 0;
                break;
             case 2:
                break;
@@ -485,7 +485,7 @@
                /*Potential security problems because we are writing
                 *to the filesystem*/
                save_certificate_home(remote_cert);
-               retval = 1;
+               ret = 1;
                break;
             default:
                break;
@@ -504,7 +504,7 @@
 
          response_number = dialog_get_answer_number();
          if (response_number == 1) {
-            retval = 0;
+            ret = 0;
          }
          break;
 
@@ -523,7 +523,7 @@
 
          response_number = dialog_get_answer_number();
          if (response_number == 1) {
-            retval = 0;
+            ret = 0;
          }
          break;
       case X509_V_ERR_CERT_NOT_YET_VALID:
@@ -542,7 +542,7 @@
 
          response_number = dialog_get_answer_number();
          if (response_number == 1) {
-            retval = 0;
+            ret = 0;
          }
          break;
       case X509_V_ERR_CERT_HAS_EXPIRED:
@@ -558,7 +558,7 @@
          dFree(d_cmd);
          response_number = dialog_get_answer_number();
          if (response_number == 1) {
-            retval = 0;
+            ret = 0;
          }
          break;
       case X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD:
@@ -577,7 +577,7 @@
          dFree(d_cmd);
          response_number = dialog_get_answer_number();
          if (response_number == 1) {
-            retval = 0;
+            ret = 0;
          }
          break;
       case X509_V_ERR_INVALID_CA:
@@ -597,7 +597,7 @@
          dFree(d_cmd);
          response_number = dialog_get_answer_number();
          if (response_number == 1) {
-            retval = 0;
+            ret = 0;
          }
          break;
       case X509_V_ERR_SUBJECT_ISSUER_MISMATCH:
@@ -623,14 +623,14 @@
          response_number = dialog_get_answer_number();
          /*abort on anything but "Continue"*/
          if (response_number == 1){
-            retval = 0;
+            ret = 0;
          }
       }
       X509_free(remote_cert);
       remote_cert = 0;
    }
 
-   return retval;
+   return ret;
 }
 
 /*
@@ -643,7 +643,7 @@
 
    FILE * fp = NULL;
    uint_t i = 0;
-   int retval = 1;
+   int ret = 1;
 
    /*Attempt to create .dillo/certs blindly - check later*/
    snprintf(buf,4096,"%s/.dillo/", dGethomedir());
@@ -666,7 +666,7 @@
             PEM_write_X509(fp, cert);
             fclose(fp);
             MSG("Wrote certificate\n");
-            retval = 0;
+            ret = 0;
             break;
          }
       } else {
@@ -676,7 +676,7 @@
       /*Don't loop too many times - just give up*/
    } while (i < 1024);
 
-   return retval;
+   return ret;
 }
 
 
--- a/dpid/dpid.c	Sun Nov 01 16:31:59 2009 -0300
+++ b/dpid/dpid.c	Sun Nov 01 16:31:59 2009 -0300
@@ -222,7 +222,7 @@
    char *service_dir = NULL;
    struct stat statinfo;
    enum file_type ftype;
-   int retval = -1;
+   int ret = -1;
    DIR *dir_stream;
    struct dirent *dir_entry = NULL;
 
@@ -252,7 +252,7 @@
                   dpi_attr->filter = 1;
                else
                   dpi_attr->filter = 0;
-               retval = 0;
+               ret = 0;
                break;
             default:
                break;
@@ -260,12 +260,12 @@
       }
       closedir(dir_stream);
 
-      if (retval != 0)
+      if (ret != 0)
          MSG_ERR("get_dpi_attr: No dpi plug-in in %s/%s\n",
                  dpi_dir, service);
    }
    dFree(service_dir);
-   return retval;
+   return ret;
 }
 
 /*! Register a service
@@ -280,7 +280,7 @@
 int register_service(struct dp *dpi_attr, char *service)
 {
    char *user_dpi_dir, *dpidrc, *user_service_dir, *dir = NULL;
-   int retval = -1;
+   int ret = -1;
 
    user_dpi_dir = dStrconcat(dGethomedir(), "/", dotDILLO_DPI, NULL);
    user_service_dir =
@@ -304,12 +304,12 @@
    /* Check home dir for dpis */
    if (access(user_service_dir, F_OK) == 0) {
       get_dpi_attr(user_dpi_dir, service, dpi_attr);
-      retval = 0;
+      ret = 0;
    } else {                     /* Check system wide dpis */
       if ((dir = get_dpi_dir(dpidrc)) != NULL) {
          if (access(dir, F_OK) == 0) {
             get_dpi_attr(dir, service, dpi_attr);
-            retval = 0;
+            ret = 0;
          } else {
             ERRMSG("register_service", "get_dpi_attr failed", 0);
          }
@@ -321,7 +321,7 @@
    dFree(user_service_dir);
    dFree(dpidrc);
    dFree(dir);
-   return (retval);
+   return ret;
 }
 
 /*!
--- a/src/IO/dpi.c	Sun Nov 01 16:31:59 2009 -0300
+++ b/src/IO/dpi.c	Sun Nov 01 16:31:59 2009 -0300
@@ -767,22 +767,22 @@
 char *a_Dpi_send_blocking_cmd(const char *server_name, const char *cmd)
 {
    int cst, sock_fd;
-   char *retval = NULL;
+   char *ret = NULL;
 
    /* test the dpid, and wait a bit for it to start if necessary */
    if ((cst = Dpi_blocking_start_dpid()) != 0) {
-      return retval;
+      return ret;
    }
 
    if ((sock_fd = Dpi_connect_socket(server_name, TRUE)) == -1) {
       MSG_ERR("[a_Dpi_send_blocking_cmd] Can't connect to server.\n");
    } else if (Dpi_blocking_write(sock_fd, cmd, strlen(cmd)) == -1) {
       MSG_ERR("[a_Dpi_send_blocking_cmd] Can't send message.\n");
-   } if ((retval = Dpi_blocking_read(sock_fd)) == NULL) {
+   } if ((ret = Dpi_blocking_read(sock_fd)) == NULL) {
       MSG_ERR("[a_Dpi_send_blocking_cmd] Can't read message.\n");
    }
    Dpi_close_fd(sock_fd);
 
-   return retval;
+   return ret;
 }