]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fixed some cases of variable shadowing
authorFrancesco Chemolli <kinkie@squid-cache.org>
Wed, 18 Nov 2009 15:48:32 +0000 (16:48 +0100)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Wed, 18 Nov 2009 15:48:32 +0000 (16:48 +0100)
15 files changed:
helpers/basic_auth/LDAP/basic_ldap_auth.cc
helpers/basic_auth/MSNT/rfcnb-util.c
helpers/basic_auth/MSNT/valid.c
helpers/basic_auth/squid_radius_auth/squid_rad_auth.c
helpers/digest_auth/eDirectory/ldap_backend.c
helpers/digest_auth/ldap/ldap_backend.c
helpers/digest_auth/password/text_backend.c
helpers/external_acl/ldap_group/squid_ldap_group.c
helpers/ntlm_auth/smb_lm/smbval/rfcnb-util.c
helpers/ntlm_auth/smb_lm/smbval/valid.c
src/errorpage.cc
src/event.cc
src/ftp.cc
src/http.cc
src/store.cc

index 02b626c71ce43f80955415be17a53bf91b72c401..5ec4ba0a9711bc34e8f442f9ed3d6f6d2ebdbbc9 100644 (file)
@@ -181,21 +181,21 @@ squid_ldap_set_referrals(LDAP * ld, int referrals)
     ldap_set_option(ld, LDAP_OPT_REFERRALS, value);
 }
 static void
-squid_ldap_set_timelimit(LDAP * ld, int timelimit)
+squid_ldap_set_timelimit(LDAP * ld, int aTimeLimit)
 {
-    ldap_set_option(ld, LDAP_OPT_TIMELIMIT, &timelimit);
+    ldap_set_option(ld, LDAP_OPT_TIMELIMIT, &aTimeLimit);
 }
 static void
-squid_ldap_set_connect_timeout(LDAP * ld, int timelimit)
+squid_ldap_set_connect_timeout(LDAP * ld, int aTimeLimit)
 {
 #if defined(LDAP_OPT_NETWORK_TIMEOUT)
     struct timeval tv;
-    tv.tv_sec = timelimit;
+    tv.tv_sec = aTimeLimit;
     tv.tv_usec = 0;
     ldap_set_option(ld, LDAP_OPT_NETWORK_TIMEOUT, &tv);
 #elif defined(LDAP_X_OPT_CONNECT_TIMEOUT)
-    timelimit *= 1000;
-    ldap_set_option(ld, LDAP_X_OPT_CONNECT_TIMEOUT, &timelimit);
+    aTimeLimit *= 1000;
+    ldap_set_option(ld, LDAP_X_OPT_CONNECT_TIMEOUT, &aTimeLimit);
 #endif
 }
 static void
index 1e966528554eba01b8d79606021620bca371b0f3..9ec83631267761c6b5131aa72a7e14762e684dd4 100644 (file)
@@ -375,10 +375,10 @@ RFCNB_Name_To_IP(char *host, struct in_addr *Dest_IP)
 /* Disconnect the TCP connection to the server */
 
 int
-RFCNB_Close(int socket)
+RFCNB_Close(int aSocket)
 {
 
-    close(socket);
+    close(aSocket);
 
     /* If we want to do error recovery, here is where we put it */
 
index 233cf3af963f5e191b301ac1527bfc2f79cc841f..8a8c91d29419e7df401d7896f562d720024bbf45 100644 (file)
@@ -9,7 +9,7 @@
 int
 Valid_User(char *USERNAME, char *PASSWORD, char *SERVER, char *BACKUP, char *DOMAIN)
 {
-    const char *SMB_Prots[] = {"PC NETWORK PROGRAM 1.0",
+    const char *supportedDialects[] = {"PC NETWORK PROGRAM 1.0",
                                "MICROSOFT NETWORKS 1.03",
                                "MICROSOFT NETWORKS 3.0",
                                "LANMAN1.0",
@@ -29,7 +29,7 @@ Valid_User(char *USERNAME, char *PASSWORD, char *SERVER, char *BACKUP, char *DOM
             return (NTV_SERVER_ERROR);
         }
     }
-    if (SMB_Negotiate(con, SMB_Prots) < 0) {   /* An error */
+    if (SMB_Negotiate(con, supportedDialects) < 0) {   /* An error */
         SMB_Discon(con, 0);
         return (NTV_PROTOCOL_ERROR);
     }
index 67e5cefb1d8b6522d14cf12f831557f49d8518cc..8e59ba464d7995fb7c0964631fc09fde31f23581 100644 (file)
@@ -219,7 +219,7 @@ result_recv(u_int32_t host, u_short udp_port, char *buffer, int length)
  *    Generate a random vector.
  */
 static void
-random_vector(char *vector)
+random_vector(char *aVector)
 {
     int randno;
     int i;
@@ -227,8 +227,8 @@ random_vector(char *vector)
     srand((time(0) ^ rand()) + rand());
     for (i = 0; i < AUTH_VECTOR_LEN;) {
         randno = rand();
-        memcpy(vector, &randno, sizeof(int));
-        vector += sizeof(int);
+        memcpy(aVector, &randno, sizeof(int));
+        aVector += sizeof(int);
         i += sizeof(int);
     }
 }
index 397c0d037deaf04148f3543fb50c6ec568a0cc05..3cd5a7815a3b63108c6d660ff83958b33b57c3f0 100644 (file)
@@ -97,21 +97,21 @@ squid_ldap_set_referrals(int referrals)
     ldap_set_option(ld, LDAP_OPT_REFERRALS, value);
 }
 static void
-squid_ldap_set_timelimit(int timelimit)
+squid_ldap_set_timelimit(int aTimeLimit)
 {
-    ldap_set_option(ld, LDAP_OPT_TIMELIMIT, &timelimit);
+    ldap_set_option(ld, LDAP_OPT_TIMELIMIT, &aTimeLimit);
 }
 static void
-squid_ldap_set_connect_timeout(int timelimit)
+squid_ldap_set_connect_timeout(int aTimeLimit)
 {
 #if defined(LDAP_OPT_NETWORK_TIMEOUT)
     struct timeval tv;
-    tv.tv_sec = timelimit;
+    tv.tv_sec = aTimeLimit;
     tv.tv_usec = 0;
     ldap_set_option(ld, LDAP_OPT_NETWORK_TIMEOUT, &tv);
 #elif defined(LDAP_X_OPT_CONNECT_TIMEOUT)
-    timelimit *= 1000;
-    ldap_set_option(ld, LDAP_X_OPT_CONNECT_TIMEOUT, &timelimit);
+    aTimeLimit *= 1000;
+    ldap_set_option(ld, LDAP_X_OPT_CONNECT_TIMEOUT, &aTimeLimit);
 #endif
 }
 
@@ -135,12 +135,12 @@ squid_ldap_set_referrals(int referrals)
         ld->ld_options &= ~LDAP_OPT_REFERRALS;
 }
 static void
-squid_ldap_set_timelimit(int timelimit)
+squid_ldap_set_timelimit(int aTimeLimit)
 {
-    ld->ld_timelimit = timelimit;
+    ld->ld_timelimit = aTimeLimit;
 }
 static void
-squid_ldap_set_connect_timeout(int timelimit)
+squid_ldap_set_connect_timeout(int aTimeLimit)
 {
     fprintf(stderr, "Connect timeouts not supported in your LDAP library\n");
 }
index 47b440829cdbf70e0814d3a6ad6846cfcfb638f1..6fa0d163754bb757d79ed19dad06c2d07e637242 100644 (file)
@@ -95,21 +95,21 @@ squid_ldap_set_referrals(int referrals)
     ldap_set_option(ld, LDAP_OPT_REFERRALS, value);
 }
 static void
-squid_ldap_set_timelimit(int timelimit)
+squid_ldap_set_timelimit(int aTimeLimit)
 {
-    ldap_set_option(ld, LDAP_OPT_TIMELIMIT, &timelimit);
+    ldap_set_option(ld, LDAP_OPT_TIMELIMIT, &aTimeLimit);
 }
 static void
-squid_ldap_set_connect_timeout(int timelimit)
+squid_ldap_set_connect_timeout(int aTimeLimit)
 {
 #if defined(LDAP_OPT_NETWORK_TIMEOUT)
     struct timeval tv;
-    tv.tv_sec = timelimit;
+    tv.tv_sec = aTimeLimit;
     tv.tv_usec = 0;
     ldap_set_option(ld, LDAP_OPT_NETWORK_TIMEOUT, &tv);
 #elif defined(LDAP_X_OPT_CONNECT_TIMEOUT)
-    timelimit *= 1000;
-    ldap_set_option(ld, LDAP_X_OPT_CONNECT_TIMEOUT, &timelimit);
+    aTimeLimit *= 1000;
+    ldap_set_option(ld, LDAP_X_OPT_CONNECT_TIMEOUT, &aTimeLimit);
 #endif
 }
 
@@ -133,12 +133,12 @@ squid_ldap_set_referrals(int referrals)
         ld->ld_options &= ~LDAP_OPT_REFERRALS;
 }
 static void
-squid_ldap_set_timelimit(int timelimit)
+squid_ldap_set_timelimit(int aTimeLimit)
 {
-    ld->ld_timelimit = timelimit;
+    ld->ld_timelimit = aTimeLimit;
 }
 static void
-squid_ldap_set_connect_timeout(int timelimit)
+squid_ldap_set_connect_timeout(int aTimeLimit)
 {
     fprintf(stderr, "Connect timeouts not supported in your LDAP library\n");
 }
index 0662555c7272a67a63bf420d5f99d70b70fb42a5..9bbaf1d479536d010231eeeb00306b76ff16a724 100644 (file)
@@ -53,7 +53,7 @@ my_free(void *p)
 }
 
 static void
-read_passwd_file(const char *passwdfile, int isHa1Mode)
+read_passwd_file(const char *passwordFile, int isHa1Mode)
 {
     FILE *f;
     char buf[8192];
@@ -72,7 +72,7 @@ read_passwd_file(const char *passwdfile, int isHa1Mode)
         fprintf(stderr, "digest_pw_auth: cannot create hash table\n");
         exit(1);
     }
-    f = fopen(passwdfile, "r");
+    f = fopen(passwordFile, "r");
     while (fgets(buf, 8192, f) != NULL) {
         if ((buf[0] == '#') || (buf[0] == ' ') || (buf[0] == '\t') ||
                 (buf[0] == '\n'))
index a89c3f43aafde7e1e073f5977064c77fa1b80a7c..abf970ef04f5607f7d9d2627fde21a03c0de58c2 100644 (file)
@@ -141,21 +141,21 @@ squid_ldap_set_referrals(LDAP * ld, int referrals)
     ldap_set_option(ld, LDAP_OPT_REFERRALS, value);
 }
 static void
-squid_ldap_set_timelimit(LDAP * ld, int timelimit)
+squid_ldap_set_timelimit(LDAP * ld, int aTimeLimit)
 {
-    ldap_set_option(ld, LDAP_OPT_TIMELIMIT, &timelimit);
+    ldap_set_option(ld, LDAP_OPT_TIMELIMIT, &aTimeLimit);
 }
 static void
-squid_ldap_set_connect_timeout(LDAP * ld, int timelimit)
+squid_ldap_set_connect_timeout(LDAP * ld, int aTimeLimit)
 {
 #if defined(LDAP_OPT_NETWORK_TIMEOUT)
     struct timeval tv;
-    tv.tv_sec = timelimit;
+    tv.tv_sec = aTimeLimit;
     tv.tv_usec = 0;
     ldap_set_option(ld, LDAP_OPT_NETWORK_TIMEOUT, &tv);
 #elif defined(LDAP_X_OPT_CONNECT_TIMEOUT)
-    timelimit *= 1000;
-    ldap_set_option(ld, LDAP_X_OPT_CONNECT_TIMEOUT, &timelimit);
+    aTimeLimit *= 1000;
+    ldap_set_option(ld, LDAP_X_OPT_CONNECT_TIMEOUT, &aTimeLimit);
 #endif
 }
 static void
index e12b36fc0aa1daa61caf6e4129c0c03d673d7453..50a6ce870d3885e3f39633e275f89c45c83bc6d9 100644 (file)
@@ -359,10 +359,10 @@ RFCNB_Name_To_IP(char *host, struct in_addr *Dest_IP)
 /* Disconnect the TCP connection to the server */
 
 int
-RFCNB_Close(int socket)
+RFCNB_Close(int aSocket)
 {
 
-    close(socket);
+    close(aSocket);
 
     /* If we want to do error recovery, here is where we put it */
 
index f481decbc20fa68ea2165dc12139a334ba508a95..4130dda766e7dc9949486363f009084de8bf3ba5 100644 (file)
@@ -22,7 +22,7 @@ int
 Valid_User(char *username, char *password, char *server, char *backup, char *domain)
 {
     int pass_is_precrypted_p = 0;
-    char const *SMB_Prots[] = {
+    char const *supportedDialects[] = {
         /*              "PC NETWORK PROGRAM 1.0", */
         /*              "MICROSOFT NETWORKS 1.03", */
         /*              "MICROSOFT NETWORKS 3.0", */
@@ -43,7 +43,7 @@ Valid_User(char *username, char *password, char *server, char *backup, char *dom
             return (NTV_SERVER_ERROR);
         }
     }
-    if (SMB_Negotiate(con, SMB_Prots) < 0) {   /* An error */
+    if (SMB_Negotiate(con, supportedDialects) < 0) {   /* An error */
         SMB_Discon(con, 0);
         return (NTV_PROTOCOL_ERROR);
     }
index a3382e97d169f6f5ecfd15554226bcbbfa8316c5..b0b773ebfd74b75785dde63f9035cce58e18c8d1 100644 (file)
@@ -737,7 +737,7 @@ ErrorState::Convert(char token, bool url_presentable)
             break;
         }
         if (NULL != request) {
-            Packer p;
+            Packer pck;
             String urlpath_or_slash;
 
             if (request->urlpath.size() != 0)
@@ -749,9 +749,9 @@ ErrorState::Convert(char token, bool url_presentable)
                       RequestMethodStr(request->method),
                       SQUIDSTRINGPRINT(urlpath_or_slash),
                       request->http_ver.major, request->http_ver.minor);
-            packerToMemInit(&p, &mb);
-            request->header.packInto(&p);
-            packerClean(&p);
+            packerToMemInit(&pck, &mb);
+            request->header.packInto(&pck);
+            packerClean(&pck);
         } else if (request_hdrs) {
             p = request_hdrs;
         } else {
index 6dc15dba40bb5015a1a23711044568f847eceb3f..612b8fcd712921bba5e8210d007a96acc2f99713 100644 (file)
@@ -108,9 +108,9 @@ EventDialer::print(std::ostream &os) const
 }
 
 
-ev_entry::ev_entry(char const * aName, EVH * aFunction, void * aArgument, double when,
-                   int weight, bool haveArgument) : name(aName), func(aFunction),
-        arg(haveArgument ? cbdataReference(aArgument) : aArgument), when(when), weight(weight),
+ev_entry::ev_entry(char const * aName, EVH * aFunction, void * aArgument, double evWhen,
+                   int aWeight, bool haveArgument) : name(aName), func(aFunction),
+        arg(haveArgument ? cbdataReference(aArgument) : aArgument), when(evWhen), weight(aWeight),
         cbdata(haveArgument)
 {
 }
index e8e05eb8c70aae6fd39d8897180550901875c653..be6a163d500c3d5ff65c262e976e1e33b4646ce3 100644 (file)
@@ -803,7 +803,7 @@ ftpListParseParts(const char *buf, struct _ftp_flags flags)
         p->type = 0;
 
         while (ct && *ct) {
-            time_t t;
+            time_t tm;
             int l = strcspn(ct, ",");
             char *tmp;
 
@@ -821,12 +821,12 @@ ftpListParseParts(const char *buf, struct _ftp_flags flags)
                 break;
 
             case 'm':
-                t = (time_t) strtol(ct + 1, &tmp, 0);
+                tm = (time_t) strtol(ct + 1, &tmp, 0);
 
                 if (tmp != ct + 1)
                     break;     /* not a valid integer */
 
-                p->date = xstrdup(ctime(&t));
+                p->date = xstrdup(ctime(&tm));
 
                 *(strstr(p->date, "\n")) = '\0';
 
index 263444a37776cdc6b29dd07fc12bc639674719cc..e8ddbe92c1a051221a3c14a2bb8c7dc10f1459d1 100644 (file)
@@ -1353,10 +1353,10 @@ HttpStateData::maybeReadVirginBody()
 {
     // we may need to grow the buffer if headers do not fit
     const int minRead = flags.headers_parsed ? 0 :1024;
-    const int read_sz = replyBodySpace(*readBuf, minRead);
+    const int read_size = replyBodySpace(*readBuf, minRead);
 
     debugs(11,9, HERE << (flags.do_next_read ? "may" : "wont") <<
-           " read up to " << read_sz << " bytes from FD " << fd);
+           " read up to " << read_size << " bytes from FD " << fd);
 
     /*
      * why <2? Because delayAwareRead() won't actually read if
@@ -1366,13 +1366,13 @@ HttpStateData::maybeReadVirginBody()
      * handler until we get a notification from someone that
      * its okay to read again.
      */
-    if (read_sz < 2)
+    if (read_size < 2)
         return;
 
     if (flags.do_next_read) {
         flags.do_next_read = 0;
         typedef CommCbMemFunT<HttpStateData, CommIoCbParams> Dialer;
-        entry->delayAwareRead(fd, readBuf->space(read_sz), read_sz,
+        entry->delayAwareRead(fd, readBuf->space(read_size), read_size,
                               asyncCall(11, 5, "HttpStateData::readReply",
                                         Dialer(this, &HttpStateData::readReply)));
     }
index e16f869e78ab212523ad103fc0084837346b9d8c..583c500dfdf9be898c44a76d0ac3609db7b6ddbb 100644 (file)
@@ -365,10 +365,10 @@ StoreEntry::StoreEntry()
     swap_dirn = -1;
 }
 
-StoreEntry::StoreEntry(const char *url, const char *log_url)
+StoreEntry::StoreEntry(const char *aUrl, const char *aLogUrl)
 {
     debugs(20, 3, HERE << "new StoreEntry " << this);
-    mem_obj = new MemObject(url, log_url);
+    mem_obj = new MemObject(aUrl, aLogUrl);
 
     expires = lastmod = lastref = timestamp = -1;
 
@@ -1627,12 +1627,12 @@ StoreEntry::url() const
 }
 
 void
-StoreEntry::createMemObject(const char *url, const char *log_url)
+StoreEntry::createMemObject(const char *aUrl, const char *aLogUrl)
 {
     if (mem_obj)
         return;
 
-    mem_obj = new MemObject(url, log_url);
+    mem_obj = new MemObject(aUrl, aLogUrl);
 }
 
 /* this just sets DELAY_SENDING */