]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Francesco Chemolli <kinkie@squid-cache.org>
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 21 Nov 2009 11:01:43 +0000 (00:01 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 21 Nov 2009 11:01:43 +0000 (00:01 +1300)
Fixed some cases of linkage type mismatch and many of parameter shadowing

62 files changed:
helpers/basic_auth/LDAP/squid_ldap_auth.c
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/external_acl/session/squid_session.c
helpers/ntlm_auth/smb_lm/smbval/rfcnb-util.c
helpers/ntlm_auth/smb_lm/smbval/valid.c
lib/MemPool.cc
lib/rfc1123.c
src/BodyPipe.cc
src/CommCalls.h
src/ConfigOption.cc
src/ConfigOption.h
src/DiskIO/AIO/AIODiskIOStrategy.cc
src/DiskIO/DiskDaemon/DiskdIOStrategy.cc
src/DiskIO/DiskDaemon/diskd.cc
src/DiskIO/DiskThreads/DiskThreadsIOStrategy.cc
src/HttpReply.cc
src/HttpRequestMethod.cc
src/StoreMeta.cc
src/String.cci
src/SwapDir.cc
src/acl/Ip.cc
src/adaptation/History.cc
src/adaptation/Iterator.cc
src/adaptation/ServiceGroups.cc
src/adaptation/icap/ModXact.cc
src/adaptation/icap/OptXact.cc
src/adaptation/icap/ServiceRep.cc
src/auth/basic/auth_basic.cc
src/auth/digest/auth_digest.cc
src/auth/negotiate/auth_negotiate.cc
src/auth/ntlm/auth_ntlm.cc
src/cache_manager.cc
src/cbdata.h
src/client_side.cc
src/client_side_reply.cc
src/comm.cc
src/errorpage.cc
src/esi/Esi.cc
src/esi/VarState.cc
src/event.cc
src/forward.cc
src/fs/ufs/store_dir_ufs.cc
src/fs/ufs/store_io_ufs.cc
src/fs/ufs/ufscommon.cc
src/ftp.cc
src/http.cc
src/icmp/Icmp6.cc
src/main.cc
src/mem.cc
src/protos.h
src/stat.cc
src/store.cc
src/store_dir.cc
src/unlinkd.cc
src/whois.cc
tools/squidclient.cc

index aefccc327520e6ee95801d5b967594a006d1819f..b8db90e83b43979d552cbb4e5883b81f5f52bc93 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..a7a24ce0f2b95b2e933814bb7e991cb3ed617d5c 100644 (file)
@@ -9,16 +9,16 @@
 int
 Valid_User(char *USERNAME, char *PASSWORD, char *SERVER, char *BACKUP, char *DOMAIN)
 {
-    const char *SMB_Prots[] = {"PC NETWORK PROGRAM 1.0",
-                               "MICROSOFT NETWORKS 1.03",
-                               "MICROSOFT NETWORKS 3.0",
-                               "LANMAN1.0",
-                               "LM1.2X002",
-                               "Samba",
-                               "NT LM 0.12",
-                               "NT LANMAN 1.0",
-                               NULL
-                              };
+    const char *supportedDialects[] = {"PC NETWORK PROGRAM 1.0",
+                                       "MICROSOFT NETWORKS 1.03",
+                                       "MICROSOFT NETWORKS 3.0",
+                                       "LANMAN1.0",
+                                       "LM1.2X002",
+                                       "Samba",
+                                       "NT LM 0.12",
+                                       "NT LANMAN 1.0",
+                                       NULL
+                                      };
     void *con;
 
     SMB_Init();
@@ -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 02bfd3014cb7c61c337586757096a51de32ecefc..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);
     }
 }
@@ -288,7 +288,7 @@ urldecode(char *dst, const char *src, int size)
 }
 
 static int
-authenticate(int sockfd, const char *username, const char *passwd)
+authenticate(int socket_fd, const char *username, const char *passwd)
 {
     AUTH_HDR *auth;
     u_short total_length;
@@ -414,7 +414,7 @@ authenticate(int sockfd, const char *username, const char *passwd)
          *    Send the request we've built.
          */
         gettimeofday(&sent, NULL);
-        send(sockfd, (char *) auth, total_length, 0);
+        send(socket_fd, (char *) auth, total_length, 0);
         while ((time_spent = time_since(&sent)) < 1000000) {
             struct timeval tv;
             int rc, len;
@@ -426,11 +426,11 @@ authenticate(int sockfd, const char *username, const char *passwd)
                 tv.tv_usec = 1000000 - time_spent;
             }
             FD_ZERO(&readfds);
-            FD_SET(sockfd, &readfds);
-            if (select(sockfd + 1, &readfds, NULL, NULL, &tv) == 0)    /* Select timeout */
+            FD_SET(socket_fd, &readfds);
+            if (select(socket_fd + 1, &readfds, NULL, NULL, &tv) == 0) /* Select timeout */
                 break;
             salen = sizeof(saremote);
-            len = recvfrom(sockfd, recv_buffer, sizeof(i_recv_buffer),
+            len = recvfrom(socket_fd, recv_buffer, sizeof(i_recv_buffer),
                            0, (struct sockaddr *) &saremote, &salen);
 
             if (len < 0)
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 384045670db2ef6009624cb6efd623f9c147bff6..9bbaf1d479536d010231eeeb00306b76ff16a724 100644 (file)
@@ -53,7 +53,7 @@ my_free(void *p)
 }
 
 static void
-read_passwd_file(const char *passwdfile, int ha1mode)
+read_passwd_file(const char *passwordFile, int isHa1Mode)
 {
     FILE *f;
     char buf[8192];
@@ -72,7 +72,7 @@ read_passwd_file(const char *passwdfile, int ha1mode)
         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'))
@@ -88,7 +88,7 @@ read_passwd_file(const char *passwdfile, int ha1mode)
             if (strncmp(passwd, "{HHA1}", 6) == 0) {
                 ha1 = passwd + 6;
                 passwd = NULL;
-            } else if (ha1mode) {
+            } else if (isHa1Mode) {
                 ha1 = passwd;
                 passwd = NULL;
             }
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 8b5b80618b44afc927cfd772b92221cd58f698cb..f92c0c98c322af69d9eee9e23b1c529451587d41 100644 (file)
@@ -149,10 +149,10 @@ int main(int argc, char **argv)
     init_db();
 
     while (fgets(request, sizeof(request), stdin)) {
-        const char *index, *detail;
+        const char *user_key, *detail;
         char *lastdetail;
         int action = 0;
-        index = strtok(request, " \n");
+        user_key = strtok(request, " \n");
         detail = strtok(NULL, "\n");
         lastdetail = strrchr(detail, ' ');
         if (lastdetail) {
@@ -166,18 +166,18 @@ int main(int argc, char **argv)
         }
         if (action == -1) {
             session_logout(detail);
-            printf("%s OK message=\"Bye\"\n", index);
+            printf("%s OK message=\"Bye\"\n", user_key);
         } else if (action == 1) {
             session_login(detail);
-            printf("%s OK message=\"Welcome\"\n", index);
+            printf("%s OK message=\"Welcome\"\n", user_key);
         } else if (session_active(detail)) {
             session_login(detail);
-            printf("%s OK\n", index);
+            printf("%s OK\n", user_key);
         } else if (default_action == 1) {
             session_login(detail);
-            printf("%s ERR message=\"Welcome\"\n", index);
+            printf("%s ERR message=\"Welcome\"\n", user_key);
         } else {
-            printf("%s ERR message=\"No session available\"\n", index);
+            printf("%s ERR message=\"No session available\"\n", user_key);
         }
     }
     shutdown_db();
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 b673b1c5632ef6868804aa22d9b2f7b29924f6b3..7150d4b900caf52efae19ca2aa4e5736683c9ca2 100644 (file)
@@ -848,7 +848,7 @@ size_t MemAllocator::RoundedSize(size_t s)
     return ((s + sizeof(void*) - 1) / sizeof(void*)) * sizeof(void*);
 }
 
-MemMalloc::MemMalloc(char const *label, size_t aSize) : MemImplementingAllocator(label, aSize) { inuse = 0; }
+MemMalloc::MemMalloc(char const *aLabel, size_t aSize) : MemImplementingAllocator(aLabel, aSize) { inuse = 0; }
 
 bool
 MemMalloc::idleTrigger(int shift) const
index 9bd85a8bc617636218d03473c955bf4f4dfd00a3..dd98d360ae007b4c5ccb370a1163e03be1be168f 100644 (file)
@@ -119,12 +119,12 @@ tmSaneValues(struct tm *tm)
 
 static struct tm *
 parse_date_elements(const char *day, const char *month, const char *year,
-                    const char *time, const char *zone) {
+                    const char *aTime, const char *zone) {
     static struct tm tm;
     char *t;
     memset(&tm, 0, sizeof(tm));
 
-    if (!day || !month || !year || !time)
+    if (!day || !month || !year || !aTime)
         return NULL;
     tm.tm_mday = atoi(day);
     tm.tm_mon = make_month(month);
@@ -137,8 +137,8 @@ parse_date_elements(const char *day, const char *month, const char *year,
         tm.tm_year += 100;
     else if (tm.tm_year > 19000)
         tm.tm_year -= 19000;
-    tm.tm_hour = make_num(time);
-    t = strchr(time, ':');
+    tm.tm_hour = make_num(aTime);
+    t = strchr(aTime, ':');
     if (!t)
         return NULL;
     t++;
@@ -158,7 +158,7 @@ parse_date(const char *str) {
     char *day = NULL;
     char *month = NULL;
     char *year = NULL;
-    char *time = NULL;
+    char *timestr = NULL;
     char *zone = NULL;
 
     xstrncpy(tmp, str, 64);
@@ -178,7 +178,7 @@ parse_date(const char *str) {
                     year = t;
                 }
             } else if (strchr(t, ':'))
-                time = t;
+                timestr = t;
             else if (!year)
                 year = t;
         } else if (!wday)
@@ -188,7 +188,7 @@ parse_date(const char *str) {
         else if (!zone)
             zone = t;
     }
-    tm = parse_date_elements(day, month, year, time, zone);
+    tm = parse_date_elements(day, month, year, timestr, zone);
 
     return tm;
 }
index 501f17b52b42ecf64df9172463f79c101b0ef7f2..eb0a7e52d4c8780ef9289f5c77bc6692a42da761 100644 (file)
@@ -200,14 +200,14 @@ BodyPipe::clearProducer(bool atEof)
 }
 
 size_t
-BodyPipe::putMoreData(const char *buf, size_t size)
+BodyPipe::putMoreData(const char *aBuffer, size_t size)
 {
     if (bodySizeKnown())
         size = min((uint64_t)size, unproducedSize());
 
     const size_t spaceSize = static_cast<size_t>(theBuf.potentialSpaceSize());
     if ((size = min(size, spaceSize))) {
-        theBuf.append(buf, size);
+        theBuf.append(aBuffer, size);
         postAppend(size);
         return size;
     }
@@ -261,15 +261,15 @@ BodyPipe::clearConsumer()
 }
 
 size_t
-BodyPipe::getMoreData(MemBuf &buf)
+BodyPipe::getMoreData(MemBuf &aMemBuffer)
 {
     if (!theBuf.hasContent())
         return 0; // did not touch the possibly uninitialized buf
 
-    if (buf.isNull())
-        buf.init();
-    const size_t size = min(theBuf.contentSize(), buf.potentialSpaceSize());
-    buf.append(theBuf.content(), size);
+    if (aMemBuffer.isNull())
+        aMemBuffer.init();
+    const size_t size = min(theBuf.contentSize(), aMemBuffer.potentialSpaceSize());
+    aMemBuffer.append(theBuf.content(), size);
     theBuf.consume(size);
     postConsume(size);
     return size; // cannot be zero if we called buf.init above
@@ -409,35 +409,35 @@ BodyPipe::scheduleBodyEndNotification()
 // a short temporary string describing buffer status for debugging
 const char *BodyPipe::status() const
 {
-    static MemBuf buf;
-    buf.reset();
+    static MemBuf outputBuffer;
+    outputBuffer.reset();
 
-    buf.append(" [", 2);
+    outputBuffer.append(" [", 2);
 
-    buf.Printf("%"PRIu64"<=%"PRIu64, theGetSize, thePutSize);
+    outputBuffer.Printf("%"PRIu64"<=%"PRIu64, theGetSize, thePutSize);
     if (theBodySize >= 0)
-        buf.Printf("<=%"PRId64, theBodySize);
+        outputBuffer.Printf("<=%"PRId64, theBodySize);
     else
-        buf.append("<=?", 3);
+        outputBuffer.append("<=?", 3);
 
-    buf.Printf(" %d+%d", (int)theBuf.contentSize(), (int)theBuf.spaceSize());
+    outputBuffer.Printf(" %d+%d", (int)theBuf.contentSize(), (int)theBuf.spaceSize());
 
-    buf.Printf(" pipe%p", this);
+    outputBuffer.Printf(" pipe%p", this);
     if (theProducer)
-        buf.Printf(" prod%p", theProducer);
+        outputBuffer.Printf(" prod%p", theProducer);
     if (theConsumer)
-        buf.Printf(" cons%p", theConsumer);
+        outputBuffer.Printf(" cons%p", theConsumer);
 
     if (mustAutoConsume)
-        buf.append(" A", 2);
+        outputBuffer.append(" A", 2);
     if (isCheckedOut)
-        buf.append(" L", 2); // Locked
+        outputBuffer.append(" L", 2); // Locked
 
-    buf.append("]", 1);
+    outputBuffer.append("]", 1);
 
-    buf.terminate();
+    outputBuffer.terminate();
 
-    return buf.content();
+    return outputBuffer.content();
 }
 
 
index d07cbd9e2472c8c3c7fb99a282b7844f410eac70..c5b39411a18d31bf10f61e5160e09ccb9c7d3167 100644 (file)
@@ -290,9 +290,9 @@ CommCbFunPtrCallT<Dialer> *commCbCall(int debugSection, int debugLevel,
 /* CommCbFunPtrCallT */
 
 template <class Dialer>
-CommCbFunPtrCallT<Dialer>::CommCbFunPtrCallT(int debugSection, int debugLevel,
+CommCbFunPtrCallT<Dialer>::CommCbFunPtrCallT(int aDebugSection, int aDebugLevel,
         const char *callName, const Dialer &aDialer):
-        AsyncCall(debugSection, debugLevel, callName),
+        AsyncCall(aDebugSection, aDebugLevel, callName),
         dialer(aDialer)
 {
 }
index de3ee2ea1465ed92fbf871d9b94aff825d615d35..00cb31d264287bc63d1557804dcb0da6918b7a98 100644 (file)
@@ -45,12 +45,12 @@ ConfigOptionVector::~ConfigOptionVector()
 }
 
 bool
-ConfigOptionVector::parse(char const *option, const char *value, int reconfiguring)
+ConfigOptionVector::parse(char const *option, const char *value, int isaReconfig)
 {
     Vector<ConfigOption *>::iterator i = options.begin();
 
     while (i != options.end()) {
-        if ((*i)->parse(option,value, reconfiguring))
+        if ((*i)->parse(option,value, isaReconfig))
             return true;
 
         ++i;
index 960ea9a8b8f46ecb7e3b22ac951cf0e53e7625f2..786350f4a21a358b195970721914615d534158d8 100644 (file)
@@ -67,9 +67,9 @@ class ConfigOptionAdapter : public ConfigOption
 public:
     ConfigOptionAdapter(C& theObject, bool (C::*parseFP)(char const *option, const char *value, int reconfiguring), void (C::*dumpFP) (StoreEntry * e) const) : object(theObject), parser (parseFP), dumper(dumpFP) {}
 
-    bool parse(char const *option, const char *value, int reconfiguring) {
+    bool parse(char const *option, const char *value, int isaReconf) {
         if (parser)
-            return (object.*parser)(option, value, reconfiguring);
+            return (object.*parser)(option, value, isaReconf);
 
         return false;
     }
index 291d2f07baed75acacc249a3c6b27d4b59ba43d4..61f79921ad37e94ce33df54b43402247c6f272f0 100644 (file)
@@ -123,7 +123,7 @@ AIODiskIOStrategy::callback()
     void *cbdata;
     int callback_valid;
     void *buf;
-    int fd;
+    int filedescriptor;
     async_queue_entry_t *aqe;
     async_queue_entry_type_t type;
 
@@ -148,7 +148,7 @@ AIODiskIOStrategy::callback()
                 /* Get the callback parameters */
                 freefunc = aqe->aq_e_free;
                 buf = aqe->aq_e_buf;
-                fd = aqe->aq_e_fd;
+                filedescriptor = aqe->aq_e_fd;
                 type = aqe->aq_e_type;
                 callback_valid = cbdataReferenceValidDone(aqe->aq_e_callback_data, &cbdata);
                 AIODiskFile * theFile = NULL;
index ac09014551b160895ba173546b15a1d3f156390a..54ba1a04d0119c19e22b497300fc6af203dbd670 100644 (file)
@@ -439,7 +439,7 @@ DiskdIOStrategy::getOptionTree() const
 }
 
 bool
-DiskdIOStrategy::optionQ1Parse(const char *name, const char *value, int reconfiguring)
+DiskdIOStrategy::optionQ1Parse(const char *name, const char *value, int isaReconfig)
 {
     if (strcmp(name, "Q1") != 0)
         return false;
@@ -448,7 +448,7 @@ DiskdIOStrategy::optionQ1Parse(const char *name, const char *value, int reconfig
 
     magic1 = atoi(value);
 
-    if (!reconfiguring)
+    if (!isaReconfig)
         return true;
 
     if (old_magic1 < magic1) {
@@ -478,7 +478,7 @@ DiskdIOStrategy::optionQ1Dump(StoreEntry * e) const
 }
 
 bool
-DiskdIOStrategy::optionQ2Parse(const char *name, const char *value, int reconfiguring)
+DiskdIOStrategy::optionQ2Parse(const char *name, const char *value, int isaReconfig)
 {
     if (strcmp(name, "Q2") != 0)
         return false;
@@ -487,7 +487,7 @@ DiskdIOStrategy::optionQ2Parse(const char *name, const char *value, int reconfig
 
     magic2 = atoi(value);
 
-    if (!reconfiguring)
+    if (!isaReconfig)
         return true;
 
     if (old_magic2 < magic2) {
index d5703107ed62201048864601b97ee90e7d93fe01..d3e39ac71fed90ec068be00a51445b01b0519fdd 100644 (file)
@@ -302,11 +302,12 @@ fsHash(const void *key, unsigned int n)
     return (*k & (--n));
 }
 
-static void
-alarm_handler(int sig)
-{
-    (void) 0;
-}
+SQUIDCEXTERN {
+    static void
+    alarm_handler(int sig) {
+        (void) 0;
+    }
+};
 
 int
 main(int argc, char *argv[])
index 9ae67dcd8908fcbcb0f9571bd27d4a762b5403cc..69f79c7abdbc54c9a5fe5a3314db0a6b7f7f18c5 100644 (file)
@@ -139,14 +139,14 @@ DiskThreadsIOStrategy::callback()
         dlinkDelete(&ctrlp->node, &used_list);
 
         if (ctrlp->done_handler) {
-            AIOCB *callback = ctrlp->done_handler;
+            AIOCB *done_callback = ctrlp->done_handler;
             void *cbdata;
             ctrlp->done_handler = NULL;
 
             if (cbdataReferenceValidDone(ctrlp->done_handler_data, &cbdata)) {
                 retval = 1;    /* Return that we've actually done some work */
-                callback(ctrlp->fd, cbdata, ctrlp->bufp,
-                         ctrlp->result.aio_return, ctrlp->result.aio_errno);
+                done_callback(ctrlp->fd, cbdata, ctrlp->bufp,
+                              ctrlp->result.aio_return, ctrlp->result.aio_errno);
             } else {
                 if (ctrlp->operation == _AIO_OPEN) {
                     /* The open operation was aborted.. */
index 72b29313d3a4f555b08f4d0f29a56250790dd81a..50af61ba54c132eeb9c4fbcd1e0ab8df822793ce 100644 (file)
@@ -210,7 +210,7 @@ HttpReply::packed304Reply()
 
 void
 HttpReply::setHeaders(HttpVersion ver, http_status status, const char *reason,
-                      const char *ctype, int64_t clen, time_t lmt, time_t expires)
+                      const char *ctype, int64_t clen, time_t lmt, time_t expiresTime)
 {
     HttpHeader *hdr;
     httpStatusLineSet(&sline, ver, status, reason);
@@ -228,8 +228,8 @@ HttpReply::setHeaders(HttpVersion ver, http_status status, const char *reason,
     if (clen >= 0)
         hdr->putInt64(HDR_CONTENT_LENGTH, clen);
 
-    if (expires >= 0)
-        hdr->putTime(HDR_EXPIRES, expires);
+    if (expiresTime >= 0)
+        hdr->putTime(HDR_EXPIRES, expiresTime);
 
     if (lmt > 0)               /* this used to be lmt != 0 @?@ */
         hdr->putTime(HDR_LAST_MODIFIED, lmt);
@@ -238,7 +238,7 @@ HttpReply::setHeaders(HttpVersion ver, http_status status, const char *reason,
 
     content_length = clen;
 
-    expires = expires;
+    expires = expiresTime;
 
     last_modified = lmt;
 }
index 8f4c9d19017ed9aa8b97b3e7f1d5d7073af88eb5..d98f3a9f5c89f9d9d12066bd68eb5a06c98b5f56 100644 (file)
@@ -152,10 +152,10 @@ HttpRequestMethod::AddExtension(const char *mstr)
 }
 
 void
-HttpRequestMethod::Configure(SquidConfig &Config)
+HttpRequestMethod::Configure(SquidConfig &cfg)
 {
 #if 0 /* extension methods obsolete now that we have METHOD_OTHER always enabled */
-    wordlist *w = Config.ext_methods;
+    wordlist *w = cfg.ext_methods;
 
     while (w) {
         char *s;
index 0211d1973d9a91b75b1120afdc8220404b41d87b..4065a4854cdea85eb0743a03313a3c3d791c6f57 100644 (file)
@@ -101,10 +101,10 @@ const int StoreMeta::MinimumTLVLength = 0;
 const int StoreMeta::MaximumTLVLength = 1 << 16;
 
 bool
-StoreMeta::validLength(int length) const
+StoreMeta::validLength(int aLength) const
 {
-    if (!IntRange (MinimumTLVLength, MaximumTLVLength).includes(length)) {
-        debugs(20, 0, "storeSwapMetaUnpack: insane length (" << length << ")!");
+    if (!IntRange (MinimumTLVLength, MaximumTLVLength).includes(aLength)) {
+        debugs(20, 0, "storeSwapMetaUnpack: insane length (" << aLength << ")!");
         return false;
     }
 
index 66790f3d65d59a6e908cd299b3e05a31eb52e5c8..085f383517e5557fc7813dcd970d88455f4e89bb 100644 (file)
@@ -80,11 +80,11 @@ String::termedBuf() const
 }
 
 char
-String::operator [](unsigned int pos) const
+String::operator [](unsigned int aPos) const
 {
-    assert(pos < size_);
+    assert(aPos < size_);
 
-    return buf_[pos];
+    return buf_[aPos];
 }
 
 
index d5d75ca1b4fcbc3ac2594284f2c0df58ae969c9a..581e4ba74dd5d7a167ac10cff7c557bf3e8ee943 100644 (file)
@@ -165,7 +165,7 @@ SwapDir::getOptionTree() const
 }
 
 void
-SwapDir::parseOptions(int reconfiguring)
+SwapDir::parseOptions(int isaReconfig)
 {
     unsigned int old_read_only = flags.read_only;
     char *name, *value;
@@ -181,7 +181,7 @@ SwapDir::parseOptions(int reconfiguring)
         debugs(3,2, "SwapDir::parseOptions: parsing store option '" << name << "'='" << (value ? value : "") << "'");
 
         if (newOption)
-            if (!newOption->parse(name, value, reconfiguring))
+            if (!newOption->parse(name, value, isaReconfig))
                 self_destruct();
     }
 
@@ -193,7 +193,7 @@ SwapDir::parseOptions(int reconfiguring)
      * parsing...
      */
 
-    if (reconfiguring) {
+    if (isaReconfig) {
         if (old_read_only != flags.read_only) {
             debugs(3, 1, "Cache dir '" << path << "' now " << (flags.read_only ? "No-Store" : "Read-Write"));
         }
@@ -212,7 +212,7 @@ SwapDir::dumpOptions(StoreEntry * entry) const
 }
 
 bool
-SwapDir::optionReadOnlyParse(char const *option, const char *value, int reconfiguring)
+SwapDir::optionReadOnlyParse(char const *option, const char *value, int isaReconfig)
 {
     if (strcmp(option, "no-store") != 0 && strcmp(option, "read-only") != 0)
         return false;
@@ -237,7 +237,7 @@ SwapDir::optionReadOnlyDump(StoreEntry * e) const
 }
 
 bool
-SwapDir::optionMaxSizeParse(char const *option, const char *value, int reconfiguring)
+SwapDir::optionMaxSizeParse(char const *option, const char *value, int isaReconfig)
 {
     if (strcmp(option, "max-size") != 0)
         return false;
@@ -247,7 +247,7 @@ SwapDir::optionMaxSizeParse(char const *option, const char *value, int reconfigu
 
     int64_t size = strtoll(value, NULL, 10);
 
-    if (reconfiguring && max_objsize != size)
+    if (isaReconfig && max_objsize != size)
         debugs(3, 1, "Cache dir '" << path << "' max object size now " << size);
 
     max_objsize = size;
@@ -276,7 +276,7 @@ SwapDir::get
 void
 
 SwapDir::get
-(String const key, STOREGETCLIENT callback, void *cbdata)
+(String const key, STOREGETCLIENT aCallback, void *aCallbackData)
 {
     fatal("not implemented");
 }
index aa2de1c5395183c3a0f8575545935a8972747137..b0951697b3a5ec3e04355c15ac97139cb6392928 100644 (file)
@@ -508,10 +508,10 @@ ACLIP::parse()
 
         while (q != NULL) {
             /* pop each result off the list and add it to the data tree individually */
-            acl_ip_data *next = q->next;
+            acl_ip_data *next_node = q->next;
             q->next = NULL;
             data = data->insert(q, acl_ip_data::NetworkCompare);
-            q = next;
+            q = next_node;
         }
     }
 }
index 70be7baaea2c386e34fde9bfd548a298aae7c5c1..4733b5aef3e77ec1cea67428c328eab92f23b0ca 100644 (file)
@@ -9,8 +9,8 @@
 /// impossible services value to identify unset theNextServices
 const static char *TheNullServices = ",null,";
 
-Adaptation::History::Entry::Entry(const String &sid, const timeval &when):
-        service(sid), start(when), theRptm(-1), retried(false)
+Adaptation::History::Entry::Entry(const String &serviceId, const timeval &when):
+        service(serviceId), start(when), theRptm(-1), retried(false)
 {
 }
 
@@ -37,13 +37,13 @@ Adaptation::History::History(): theNextServices(TheNullServices)
 {
 }
 
-int Adaptation::History::recordXactStart(const String &sid, const timeval &when, bool retrying)
+int Adaptation::History::recordXactStart(const String &serviceId, const timeval &when, bool retrying)
 {
     if (retrying) {
         Must(!theEntries.empty()); // or there would be nothing to retry
         theEntries.back().retried = true;
     }
-    theEntries.push_back(Adaptation::History::Entry(sid, when));
+    theEntries.push_back(Adaptation::History::Entry(serviceId, when));
     return theEntries.size() - 1; // record position becomes history ID
 }
 
index c422846031a9e0bdc9d02375073f32dc3f76fda1..1b903faf0a2c0dcab73a3f0f4907445099c3a030 100644 (file)
@@ -196,10 +196,10 @@ Adaptation::ServiceFilter Adaptation::Iterator::filter() const
         method = methodReqmod;
         req = r;
         rep = NULL;
-    } else if (HttpReply *r = dynamic_cast<HttpReply*>(theMsg)) {
+    } else if (HttpReply *theReply = dynamic_cast<HttpReply*>(theMsg)) {
         method = methodRespmod;
         req = theCause;
-        rep = r;
+        rep = theReply;
     } else {
         Must(false); // should not happen
     }
index 8787b293a45f28be87009469cff945c98bf7f63e..a680b17e9c66ae323cfe4f5cc8d8a78569845990 100644 (file)
@@ -45,7 +45,7 @@ Adaptation::ServiceGroup::finalize()
     bool baselineBypass = false;
     for (Pos pos = 0; has(pos); ++pos) {
         // TODO: quit on all errors
-        const String &sid = services[pos];
+        const String &serviceId = services[pos];
         ServicePointer service = at(pos);
         if (service != NULL) {
             if (method == methodNone) {
@@ -54,9 +54,9 @@ Adaptation::ServiceGroup::finalize()
                 point = service->cfg().point;
             } else {
                 if (method != service->cfg().method)
-                    finalizeMsg("Inconsistent service method for", sid, true);
+                    finalizeMsg("Inconsistent service method for", serviceId, true);
                 if (point != service->cfg().point)
-                    finalizeMsg("Inconsistent vectoring point for", sid, true);
+                    finalizeMsg("Inconsistent vectoring point for", serviceId, true);
             }
 
             checkUniqueness(pos);
@@ -68,11 +68,11 @@ Adaptation::ServiceGroup::finalize()
                 } else if (baselineBypass != service->cfg().bypass) {
                     debugs(93,0, "WARNING: Inconsistent bypass in " << kind <<
                            ' ' << id << " may produce surprising results: " <<
-                           baselineKey << " vs. " << sid);
+                           baselineKey << " vs. " << serviceId);
                 }
             }
         } else {
-            finalizeMsg("ERROR: Unknown adaptation name", sid, true);
+            finalizeMsg("ERROR: Unknown adaptation name", serviceId, true);
         }
     }
     debugs(93,7, HERE << "finalized " << kind << ": " << id);
index c99d33dce4a4239cbbfd6786d7c2dde55a81eb25..70ba8679d3e878ad23ca71398e0cbfeb4fe89718 100644 (file)
@@ -337,20 +337,20 @@ size_t Adaptation::Icap::ModXact::virginContentSize(const Adaptation::Icap::Virg
 {
     Must(act.active());
     // asbolute start of unprocessed data
-    const uint64_t start = act.offset();
+    const uint64_t dataStart = act.offset();
     // absolute end of buffered data
-    const uint64_t end = virginConsumed + virgin.body_pipe->buf().contentSize();
-    Must(virginConsumed <= start && start <= end);
-    return static_cast<size_t>(end - start);
+    const uint64_t dataEnd = virginConsumed + virgin.body_pipe->buf().contentSize();
+    Must(virginConsumed <= dataStart && dataStart <= dataEnd);
+    return static_cast<size_t>(dataEnd - dataStart);
 }
 
 // pointer to buffered virgin body data available for the specified activity
 const char *Adaptation::Icap::ModXact::virginContentData(const Adaptation::Icap::VirginBodyAct &act) const
 {
     Must(act.active());
-    const uint64_t start = act.offset();
-    Must(virginConsumed <= start);
-    return virgin.body_pipe->buf().content() + static_cast<size_t>(start-virginConsumed);
+    const uint64_t dataStart = act.offset();
+    Must(virginConsumed <= dataStart);
+    return virgin.body_pipe->buf().content() + static_cast<size_t>(dataStart-virginConsumed);
 }
 
 void Adaptation::Icap::ModXact::virginConsume()
@@ -1700,7 +1700,7 @@ void Adaptation::Icap::ModXactLauncher::swanSong()
     Adaptation::Icap::Launcher::swanSong();
 }
 
-void Adaptation::Icap::ModXactLauncher::updateHistory(bool start)
+void Adaptation::Icap::ModXactLauncher::updateHistory(bool doStart)
 {
     HttpRequest *r = virgin.cause ?
                      virgin.cause : dynamic_cast<HttpRequest*>(virgin.header);
@@ -1709,7 +1709,7 @@ void Adaptation::Icap::ModXactLauncher::updateHistory(bool start)
     if (r) {
         Adaptation::Icap::History::Pointer h = r->icapHistory();
         if (h != NULL) {
-            if (start)
+            if (doStart)
                 h->start("ICAPModXactLauncher");
             else
                 h->stop("ICAPModXactLauncher");
index 5219cc9b0a6fba620ff24e6782fe97c507804ca3..0eb53af1debb4dbf2972ba83d29d85855f767020 100644 (file)
@@ -52,8 +52,8 @@ void Adaptation::Icap::OptXact::makeRequest(MemBuf &buf)
     buf.append(ICAP::crlf, 2);
 
     // XXX: HttpRequest cannot fully parse ICAP Request-Line
-    http_status status;
-    Must(icapRequest->parse(&buf, true, &status) > 0);
+    http_status reqStatus;
+    Must(icapRequest->parse(&buf, true, &reqStatus) > 0);
 }
 
 void Adaptation::Icap::OptXact::handleCommWrote(size_t size)
index f5fd4d05a6e1a3a5db8126dd7845f8f8fc6642d9..c6a0740050a9bec5aaa3ae6d0c5ca65ff2214f1a 100644 (file)
@@ -15,8 +15,8 @@
 
 CBDATA_NAMESPACED_CLASS_INIT(Adaptation::Icap, ServiceRep);
 
-Adaptation::Icap::ServiceRep::ServiceRep(const Adaptation::ServiceConfig &cfg):
-        AsyncJob("Adaptation::Icap::ServiceRep"), Adaptation::Service(cfg),
+Adaptation::Icap::ServiceRep::ServiceRep(const Adaptation::ServiceConfig &svcCfg):
+        AsyncJob("Adaptation::Icap::ServiceRep"), Adaptation::Service(svcCfg),
         theOptions(NULL), theOptionsFetcher(0), theLastUpdate(0),
         theSessionFailures(0), isSuspended(0), notifying(false),
         updateScheduled(false), self(NULL),
index aae8d6a2b69276cf8a52fb52ebed07178ffaadb7..bc67847427cb48f481a57f0b9e58d53be34e5382 100644 (file)
@@ -211,11 +211,11 @@ AuthBasicUserRequest::module_direction()
 }
 
 void
-AuthBasicConfig::fixHeader(AuthUserRequest *auth_user_request, HttpReply *rep, http_hdr_type type, HttpRequest * request)
+AuthBasicConfig::fixHeader(AuthUserRequest *auth_user_request, HttpReply *rep, http_hdr_type hdrType, HttpRequest * request)
 {
     if (authenticate) {
-        debugs(29, 9, HERE << "Sending type:" << type << " header: 'Basic realm=\"" << basicAuthRealm << "\"'");
-        httpHeaderPutStrf(&rep->header, type, "Basic realm=\"%s\"", basicAuthRealm);
+        debugs(29, 9, HERE << "Sending type:" << hdrType << " header: 'Basic realm=\"" << basicAuthRealm << "\"'");
+        httpHeaderPutStrf(&rep->header, hdrType, "Basic realm=\"%s\"", basicAuthRealm);
     }
 }
 
@@ -382,7 +382,7 @@ BasicUser::deleteSelf() const
     delete this;
 }
 
-BasicUser::BasicUser(AuthConfig *config) : AuthUser (config) , passwd (NULL), credentials_checkedtime(0), auth_queue(NULL), cleartext (NULL), currentRequest (NULL), httpAuthHeader (NULL)
+BasicUser::BasicUser(AuthConfig *aConfig) : AuthUser (aConfig) , passwd (NULL), credentials_checkedtime(0), auth_queue(NULL), cleartext (NULL), currentRequest (NULL), httpAuthHeader (NULL)
 {
     flags.credentials_ok = 0;
 }
index d482cfbae7ecdeb4ad10cd34b44915559794023c..bf0add93133a7740d6eb3abb5764d32dd59fcf0d 100644 (file)
@@ -773,7 +773,7 @@ AuthDigestUserRequest::addTrailer(HttpReply * rep, int accel)
 
 /* add the [www-|Proxy-]authenticate header on a 407 or 401 reply */
 void
-AuthDigestConfig::fixHeader(AuthUserRequest *auth_user_request, HttpReply *rep, http_hdr_type type, HttpRequest * request)
+AuthDigestConfig::fixHeader(AuthUserRequest *auth_user_request, HttpReply *rep, http_hdr_type hdrType, HttpRequest * request)
 {
     if (!authenticate)
         return;
@@ -791,13 +791,13 @@ AuthDigestConfig::fixHeader(AuthUserRequest *auth_user_request, HttpReply *rep,
     /* on a 407 or 401 we always use a new nonce */
     digest_nonce_h *nonce = authenticateDigestNonceNew();
 
-    debugs(29, 9, "authenticateFixHeader: Sending type:" << type <<
+    debugs(29, 9, "authenticateFixHeader: Sending type:" << hdrType <<
            " header: 'Digest realm=\"" << digestAuthRealm << "\", nonce=\"" <<
            authenticateDigestNonceNonceb64(nonce) << "\", qop=\"" << QOP_AUTH <<
            "\", stale=" << (stale ? "true" : "false"));
 
     /* in the future, for WWW auth we may want to support the domain entry */
-    httpHeaderPutStrf(&rep->header, type, "Digest realm=\"%s\", nonce=\"%s\", qop=\"%s\", stale=%s", digestAuthRealm, authenticateDigestNonceNonceb64(nonce), QOP_AUTH, stale ? "true" : "false");
+    httpHeaderPutStrf(&rep->header, hdrType, "Digest realm=\"%s\", nonce=\"%s\", qop=\"%s\", stale=%s", digestAuthRealm, authenticateDigestNonceNonceb64(nonce), QOP_AUTH, stale ? "true" : "false");
 }
 
 DigestUser::~DigestUser()
@@ -1375,9 +1375,9 @@ AuthDigestUserRequest::module_start(RH * handler, void *data)
     r->auth_user_request = this;
     AUTHUSERREQUESTLOCK(r->auth_user_request, "r");
     if (digestConfig.utf8) {
-        char user[1024];
-        latin1_to_utf8(user, sizeof(user), digest_user->username());
-        snprintf(buf, 8192, "\"%s\":\"%s\"\n", user, realm);
+        char userstr[1024];
+        latin1_to_utf8(userstr, sizeof(userstr), digest_user->username());
+        snprintf(buf, 8192, "\"%s\":\"%s\"\n", userstr, realm);
     } else {
         snprintf(buf, 8192, "\"%s\":\"%s\"\n", digest_user->username(), realm);
     }
@@ -1385,7 +1385,7 @@ AuthDigestUserRequest::module_start(RH * handler, void *data)
     helperSubmit(digestauthenticators, buf, authenticateDigestHandleReply, r);
 }
 
-DigestUser::DigestUser (AuthConfig *config) : AuthUser (config), HA1created (0)
+DigestUser::DigestUser (AuthConfig *aConfig) : AuthUser (aConfig), HA1created (0)
 {}
 
 AuthUser *
index 01c2f713ba235ff0693a43a4640e4c9de01d1a47..948422083cd30787733e28fb46ed0e72947625ed 100644 (file)
@@ -301,7 +301,7 @@ AuthNegotiateUserRequest::addHeader(HttpReply * rep, int accel)
 }
 
 void
-AuthNegotiateConfig::fixHeader(AuthUserRequest *auth_user_request, HttpReply *rep, http_hdr_type type, HttpRequest * request)
+AuthNegotiateConfig::fixHeader(AuthUserRequest *auth_user_request, HttpReply *rep, http_hdr_type reqType, HttpRequest * request)
 {
     AuthNegotiateUserRequest *negotiate_request;
 
@@ -314,8 +314,8 @@ AuthNegotiateConfig::fixHeader(AuthUserRequest *auth_user_request, HttpReply *re
 
     /* New request, no user details */
     if (auth_user_request == NULL) {
-        debugs(29, 9, "AuthNegotiateConfig::fixHeader: Sending type:" << type << " header: 'Negotiate'");
-        httpHeaderPutStrf(&rep->header, type, "Negotiate");
+        debugs(29, 9, "AuthNegotiateConfig::fixHeader: Sending type:" << reqType << " header: 'Negotiate'");
+        httpHeaderPutStrf(&rep->header, reqType, "Negotiate");
 
         if (!keep_alive) {
             /* drop the connection */
@@ -342,12 +342,12 @@ AuthNegotiateConfig::fixHeader(AuthUserRequest *auth_user_request, HttpReply *re
              */
 
             if (negotiate_request->server_blob) {
-                debugs(29, 9, "authenticateNegotiateFixErrorHeader: Sending type:" << type << " header: 'Negotiate " << negotiate_request->server_blob << "'");
-                httpHeaderPutStrf(&rep->header, type, "Negotiate %s", negotiate_request->server_blob);
+                debugs(29, 9, "authenticateNegotiateFixErrorHeader: Sending type:" << reqType << " header: 'Negotiate " << negotiate_request->server_blob << "'");
+                httpHeaderPutStrf(&rep->header, reqType, "Negotiate %s", negotiate_request->server_blob);
                 safe_free(negotiate_request->server_blob);
             } else {
                 debugs(29, 9, "authenticateNegotiateFixErrorHeader: Connection authenticated");
-                httpHeaderPutStrf(&rep->header, type, "Negotiate");
+                httpHeaderPutStrf(&rep->header, reqType, "Negotiate");
             }
 
             break;
@@ -355,14 +355,14 @@ AuthNegotiateConfig::fixHeader(AuthUserRequest *auth_user_request, HttpReply *re
         case AUTHENTICATE_STATE_NONE:
             /* semantic change: do not drop the connection.
              * 2.5 implementation used to keep it open - Kinkie */
-            debugs(29, 9, "AuthNegotiateConfig::fixHeader: Sending type:" << type << " header: 'Negotiate'");
-            httpHeaderPutStrf(&rep->header, type, "Negotiate");
+            debugs(29, 9, "AuthNegotiateConfig::fixHeader: Sending type:" << reqType << " header: 'Negotiate'");
+            httpHeaderPutStrf(&rep->header, reqType, "Negotiate");
             break;
 
         case AUTHENTICATE_STATE_IN_PROGRESS:
             /* we're waiting for a response from the client. Pass it the blob */
-            debugs(29, 9, "AuthNegotiateConfig::fixHeader: Sending type:" << type << " header: 'Negotiate " << negotiate_request->server_blob << "'");
-            httpHeaderPutStrf(&rep->header, type, "Negotiate %s", negotiate_request->server_blob);
+            debugs(29, 9, "AuthNegotiateConfig::fixHeader: Sending type:" << reqType << " header: 'Negotiate " << negotiate_request->server_blob << "'");
+            httpHeaderPutStrf(&rep->header, reqType, "Negotiate %s", negotiate_request->server_blob);
             safe_free(negotiate_request->server_blob);
             break;
 
@@ -660,7 +660,7 @@ AuthNegotiateUserRequest::authenticated() const
 }
 
 void
-AuthNegotiateUserRequest::authenticate(HttpRequest * request, ConnStateData * conn, http_hdr_type type)
+AuthNegotiateUserRequest::authenticate(HttpRequest * aRequest, ConnStateData * conn, http_hdr_type type)
 {
     const char *proxy_auth, *blob;
 
@@ -694,7 +694,7 @@ AuthNegotiateUserRequest::authenticate(HttpRequest * request, ConnStateData * co
     }
 
     /* get header */
-    proxy_auth = request->header.getStr(type);
+    proxy_auth = aRequest->header.getStr(type);
 
     /* locate second word */
     blob = proxy_auth;
@@ -722,8 +722,8 @@ AuthNegotiateUserRequest::authenticate(HttpRequest * request, ConnStateData * co
         assert(conn->auth_user_request == NULL);
         conn->auth_user_request = this;
         AUTHUSERREQUESTLOCK(conn->auth_user_request, "conn");
-        this->request = request;
-        HTTPMSGLOCK(this->request);
+        request = aRequest;
+        HTTPMSGLOCK(request);
         return;
 
         break;
@@ -743,10 +743,10 @@ AuthNegotiateUserRequest::authenticate(HttpRequest * request, ConnStateData * co
 
         client_blob = xstrdup (blob);
 
-        if (this->request)
-            HTTPMSGUNLOCK(this->request);
-        this->request = request;
-        HTTPMSGLOCK(this->request);
+        if (request)
+            HTTPMSGUNLOCK(request);
+        request = aRequest;
+        HTTPMSGLOCK(request);
         return;
 
         break;
@@ -801,7 +801,7 @@ NegotiateUser::deleteSelf() const
     delete this;
 }
 
-NegotiateUser::NegotiateUser (AuthConfig *config) : AuthUser (config)
+NegotiateUser::NegotiateUser (AuthConfig *aConfig) : AuthUser (aConfig)
 {
     proxy_auth_list.head = proxy_auth_list.tail = NULL;
 }
index bc1cb5e12b9cbe603b5b807ca3ae25aef15896d8..a2b119bf3e2461f243422201daf05e595e598e48 100644 (file)
@@ -259,7 +259,7 @@ AuthNTLMUserRequest::module_direction()
 }
 
 void
-AuthNTLMConfig::fixHeader(AuthUserRequest *auth_user_request, HttpReply *rep, http_hdr_type type, HttpRequest * request)
+AuthNTLMConfig::fixHeader(AuthUserRequest *auth_user_request, HttpReply *rep, http_hdr_type hdrType, HttpRequest * request)
 {
     AuthNTLMUserRequest *ntlm_request;
 
@@ -272,8 +272,8 @@ AuthNTLMConfig::fixHeader(AuthUserRequest *auth_user_request, HttpReply *rep, ht
 
     /* New request, no user details */
     if (auth_user_request == NULL) {
-        debugs(29, 9, "AuthNTLMConfig::fixHeader: Sending type:" << type << " header: 'NTLM'");
-        httpHeaderPutStrf(&rep->header, type, "NTLM");
+        debugs(29, 9, "AuthNTLMConfig::fixHeader: Sending type:" << hdrType << " header: 'NTLM'");
+        httpHeaderPutStrf(&rep->header, hdrType, "NTLM");
 
         if (!keep_alive) {
             /* drop the connection */
@@ -301,14 +301,14 @@ AuthNTLMConfig::fixHeader(AuthUserRequest *auth_user_request, HttpReply *rep, ht
         case AUTHENTICATE_STATE_NONE:
             /* semantic change: do not drop the connection.
              * 2.5 implementation used to keep it open - Kinkie */
-            debugs(29, 9, "AuthNTLMConfig::fixHeader: Sending type:" << type << " header: 'NTLM'");
-            httpHeaderPutStrf(&rep->header, type, "NTLM");
+            debugs(29, 9, "AuthNTLMConfig::fixHeader: Sending type:" << hdrType << " header: 'NTLM'");
+            httpHeaderPutStrf(&rep->header, hdrType, "NTLM");
             break;
 
         case AUTHENTICATE_STATE_IN_PROGRESS:
             /* we're waiting for a response from the client. Pass it the blob */
-            debugs(29, 9, "AuthNTLMConfig::fixHeader: Sending type:" << type << " header: 'NTLM " << ntlm_request->server_blob << "'");
-            httpHeaderPutStrf(&rep->header, type, "NTLM %s", ntlm_request->server_blob);
+            debugs(29, 9, "AuthNTLMConfig::fixHeader: Sending type:" << hdrType << " header: 'NTLM " << ntlm_request->server_blob << "'");
+            httpHeaderPutStrf(&rep->header, hdrType, "NTLM %s", ntlm_request->server_blob);
             safe_free(ntlm_request->server_blob);
             break;
 
@@ -577,7 +577,7 @@ AuthNTLMUserRequest::authenticated() const
 }
 
 void
-AuthNTLMUserRequest::authenticate(HttpRequest * request, ConnStateData * conn, http_hdr_type type)
+AuthNTLMUserRequest::authenticate(HttpRequest * aRequest, ConnStateData * conn, http_hdr_type type)
 {
     const char *proxy_auth, *blob;
 
@@ -611,7 +611,7 @@ AuthNTLMUserRequest::authenticate(HttpRequest * request, ConnStateData * conn, h
     }
 
     /* get header */
-    proxy_auth = request->header.getStr(type);
+    proxy_auth = aRequest->header.getStr(type);
 
     /* locate second word */
     blob = proxy_auth;
@@ -640,8 +640,8 @@ AuthNTLMUserRequest::authenticate(HttpRequest * request, ConnStateData * conn, h
         assert(conn->auth_user_request == NULL);
         conn->auth_user_request = this;
         AUTHUSERREQUESTLOCK(conn->auth_user_request, "conn");
-        this->request = request;
-        HTTPMSGLOCK(this->request);
+        request = aRequest;
+        HTTPMSGLOCK(request);
         return;
 
         break;
@@ -661,10 +661,10 @@ AuthNTLMUserRequest::authenticate(HttpRequest * request, ConnStateData * conn, h
 
         client_blob = xstrdup (blob);
 
-        if (this->request)
-            HTTPMSGUNLOCK(this->request);
-        this->request = request;
-        HTTPMSGLOCK(this->request);
+        if (request)
+            HTTPMSGUNLOCK(request);
+        request = aRequest;
+        HTTPMSGLOCK(request);
         return;
 
         break;
@@ -716,7 +716,7 @@ NTLMUser::deleteSelf() const
     delete this;
 }
 
-NTLMUser::NTLMUser (AuthConfig *config) : AuthUser (config)
+NTLMUser::NTLMUser (AuthConfig *aConfig) : AuthUser (aConfig)
 {
     proxy_auth_list.head = proxy_auth_list.tail = NULL;
 }
index 164bb41907bd52cdd7eb395f6b2e80c7d2dab7ca..fec008686668527dba1086ba889a92fa26047a76 100644 (file)
@@ -288,9 +288,9 @@ CacheManager::Start(int fd, HttpRequest * request, StoreEntry * entry)
 
     if (CheckPassword(mgr) != 0) {
         /* build error message */
-        ErrorState *err;
+        ErrorState *errState;
         HttpReply *rep;
-        err = errorCon(ERR_CACHE_MGR_ACCESS_DENIED, HTTP_UNAUTHORIZED, request);
+        errState = errorCon(ERR_CACHE_MGR_ACCESS_DENIED, HTTP_UNAUTHORIZED, request);
         /* warn if user specified incorrect password */
 
         if (mgr->passwd)
@@ -304,9 +304,9 @@ CacheManager::Start(int fd, HttpRequest * request, StoreEntry * entry)
                    fd_table[fd].ipaddr << ": password needed for '" <<
                    mgr->action << "'" );
 
-        rep = err->BuildHttpReply();
+        rep = errState->BuildHttpReply();
 
-        errorStateFree(err);
+        errorStateFree(errState);
 
         /*
          * add Authenticate header, use 'action' as a realm because
index 5c4b0320e541d6c47e930808f267d7021aa2efc0..617f3dfac8b8e96b14f4c74a3a90339d221202ae 100644 (file)
@@ -448,7 +448,7 @@ class generic_cbdata
 {
 public:
 
-    generic_cbdata(void * data) : data(data) {}
+    generic_cbdata(void * aData) : data(aData) {}
 
     template<typename wrapped_type>void unwrap(wrapped_type **output) {
         *output = static_cast<wrapped_type *>(data);
index 4d3b9a0b30196e802374fbd13ae5cb14e0bd01ee..026a4f5b04ffd97515d80bc43d8591c59a5c61a0 100644 (file)
@@ -981,14 +981,14 @@ ClientSocketContext::packRange(StoreIOBuffer const &source, MemBuf * mb)
             return;
         }
 
-        int64_t next = getNextRangeOffset();
+        int64_t nextOffset = getNextRangeOffset();
 
-        assert (next >= http->out.offset);
+        assert (nextOffset >= http->out.offset);
 
-        int64_t skip = next - http->out.offset;
+        int64_t skip = nextOffset - http->out.offset;
 
         /* adjust for not to be transmitted bytes */
-        http->out.offset = next;
+        http->out.offset = nextOffset;
 
         if (available.size() <= skip)
             return;
@@ -1668,23 +1668,23 @@ ClientSocketContext::initiateClose(const char *reason)
 }
 
 void
-ClientSocketContext::writeComplete(int fd, char *bufnotused, size_t size, comm_err_t errflag)
+ClientSocketContext::writeComplete(int aFileDescriptor, char *bufnotused, size_t size, comm_err_t errflag)
 {
     StoreEntry *entry = http->storeEntry();
     http->out.size += size;
-    assert(fd > -1);
-    debugs(33, 5, "clientWriteComplete: FD " << fd << ", sz " << size <<
+    assert(aFileDescriptor > -1);
+    debugs(33, 5, "clientWriteComplete: FD " << aFileDescriptor << ", sz " << size <<
            ", err " << errflag << ", off " << http->out.size << ", len " <<
            entry ? entry->objectLen() : 0);
     clientUpdateSocketStats(http->logType, size);
-    assert (this->fd() == fd);
+    assert (this->fd() == aFileDescriptor);
 
     /* Bail out quickly on COMM_ERR_CLOSING - close handlers will tidy up */
 
     if (errflag == COMM_ERR_CLOSING)
         return;
 
-    if (errflag || clientHttpRequestStatus(fd, http)) {
+    if (errflag || clientHttpRequestStatus(aFileDescriptor, http)) {
         initiateClose("failure or true request status");
         /* Do we leak here ? */
         return;
@@ -1697,7 +1697,7 @@ ClientSocketContext::writeComplete(int fd, char *bufnotused, size_t size, comm_e
         break;
 
     case STREAM_COMPLETE:
-        debugs(33, 5, "clientWriteComplete: FD " << fd << " Keeping Alive");
+        debugs(33, 5, "clientWriteComplete: FD " << aFileDescriptor << " Keeping Alive");
         keepaliveNextRequest();
         return;
 
@@ -3732,7 +3732,7 @@ ConnStateData::clientPinnedConnectionClosed(const CommCloseCbParams &io)
      * connection has gone away */
 }
 
-void ConnStateData::pinConnection(int pinning_fd, HttpRequest *request, struct peer *peer, bool auth)
+void ConnStateData::pinConnection(int pinning_fd, HttpRequest *request, struct peer *aPeer, bool auth)
 {
     fde *f;
     char desc[FD_DESC_SZ];
@@ -3751,12 +3751,12 @@ void ConnStateData::pinConnection(int pinning_fd, HttpRequest *request, struct p
     pinning.pinned = true;
     if (pinning.peer)
         cbdataReferenceDone(pinning.peer);
-    if (peer)
-        pinning.peer = cbdataReference(peer);
+    if (aPeer)
+        pinning.peer = cbdataReference(aPeer);
     pinning.auth = auth;
     f = &fd_table[fd];
     snprintf(desc, FD_DESC_SZ, "%s pinned connection for %s:%d (%d)",
-             (auth || !peer) ? request->GetHost() : peer->name, f->ipaddr, (int) f->remote_port, fd);
+             (auth || !aPeer) ? request->GetHost() : aPeer->name, f->ipaddr, (int) f->remote_port, fd);
     fd_note(pinning_fd, desc);
 
     typedef CommCbMemFunT<ConnStateData, CommCloseCbParams> Dialer;
@@ -3766,7 +3766,7 @@ void ConnStateData::pinConnection(int pinning_fd, HttpRequest *request, struct p
 
 }
 
-int ConnStateData::validatePinnedConnection(HttpRequest *request, const struct peer *peer)
+int ConnStateData::validatePinnedConnection(HttpRequest *request, const struct peer *aPeer)
 {
     bool valid = true;
     if (pinning.fd < 0)
@@ -3781,7 +3781,7 @@ int ConnStateData::validatePinnedConnection(HttpRequest *request, const struct p
     if (pinning.peer && !cbdataReferenceValid(pinning.peer)) {
         valid = false;
     }
-    if (peer != pinning.peer) {
+    if (aPeer != pinning.peer) {
         valid = false;
     }
 
index 20358acdb2098fbe2760596ce0d69b39c27e410f..3ae6af5b934e80e060d8fd2f2c5f6a2133539cb4 100644 (file)
@@ -126,22 +126,22 @@ clientReplyContext::removeStoreReference(store_client ** scp,
         StoreEntry ** ep)
 {
     StoreEntry *e;
-    store_client *sc = *scp;
+    store_client *sc_tmp = *scp;
 
     if ((e = *ep) != NULL) {
         *ep = NULL;
-        storeUnregister(sc, e, this);
+        storeUnregister(sc_tmp, e, this);
         *scp = NULL;
         e->unlock();
     }
 }
 
 void
-clientReplyContext::removeClientStoreReference(store_client **scp, ClientHttpRequest *http)
+clientReplyContext::removeClientStoreReference(store_client **scp, ClientHttpRequest *aHttpRequest)
 {
-    StoreEntry *reference = http->storeEntry();
+    StoreEntry *reference = aHttpRequest->storeEntry();
     removeStoreReference(scp, &reference);
-    http->storeEntry(reference);
+    aHttpRequest->storeEntry(reference);
 }
 
 void *
@@ -217,8 +217,8 @@ clientReplyContext::triggerInitialStoreRead()
      * startSendProcess
      */
     assert(reqofs == 0);
-    StoreIOBuffer tempBuffer (next()->readBuffer.length, 0, next()->readBuffer.data);
-    storeClientCopy(sc, http->storeEntry(), tempBuffer, SendMoreData, this);
+    StoreIOBuffer localTempBuffer (next()->readBuffer.length, 0, next()->readBuffer.data);
+    storeClientCopy(sc, http->storeEntry(), localTempBuffer, SendMoreData, this);
 }
 
 /* there is an expired entry in the store.
@@ -278,8 +278,8 @@ clientReplyContext::processExpired()
 
     {
         /* start counting the length from 0 */
-        StoreIOBuffer tempBuffer(HTTP_REQBUF_SZ, 0, tempbuf);
-        storeClientCopy(sc, entry, tempBuffer, HandleIMSReply, this);
+        StoreIOBuffer localTempBuffer(HTTP_REQBUF_SZ, 0, tempbuf);
+        storeClientCopy(sc, entry, localTempBuffer, HandleIMSReply, this);
     }
 }
 
@@ -807,7 +807,7 @@ clientReplyContext::purgeFoundObject(StoreEntry *entry)
         return;
     }
 
-    StoreIOBuffer tempBuffer;
+    StoreIOBuffer localTempBuffer;
     /* Swap in the metadata */
     http->storeEntry(entry);
 
@@ -822,14 +822,14 @@ clientReplyContext::purgeFoundObject(StoreEntry *entry)
 
     reqofs = 0;
 
-    tempBuffer.offset = http->out.offset;
+    localTempBuffer.offset = http->out.offset;
 
-    tempBuffer.length = next()->readBuffer.length;
+    localTempBuffer.length = next()->readBuffer.length;
 
-    tempBuffer.data = next()->readBuffer.data;
+    localTempBuffer.data = next()->readBuffer.data;
 
     storeClientCopy(sc, http->storeEntry(),
-                    tempBuffer, CacheHit, this);
+                    localTempBuffer, CacheHit, this);
 }
 
 void
@@ -947,15 +947,15 @@ clientReplyContext::purgeDoPurgeHead(StoreEntry *newEntry)
 void
 clientReplyContext::traceReply(clientStreamNode * node)
 {
-    clientStreamNode *next = (clientStreamNode *)node->node.next->data;
-    StoreIOBuffer tempBuffer;
+    clientStreamNode *nextNode = (clientStreamNode *)node->node.next->data;
+    StoreIOBuffer localTempBuffer;
     assert(http->request->max_forwards == 0);
     createStoreEntry(http->request->method, request_flags());
-    tempBuffer.offset = next->readBuffer.offset + headers_sz;
-    tempBuffer.length = next->readBuffer.length;
-    tempBuffer.data = next->readBuffer.data;
+    localTempBuffer.offset = nextNode->readBuffer.offset + headers_sz;
+    localTempBuffer.length = nextNode->readBuffer.length;
+    localTempBuffer.data = nextNode->readBuffer.data;
     storeClientCopy(sc, http->storeEntry(),
-                    tempBuffer, SendMoreData, this);
+                    localTempBuffer, SendMoreData, this);
     http->storeEntry()->releaseRequest();
     http->storeEntry()->buffer();
     HttpReply *rep = new HttpReply;
@@ -1021,7 +1021,7 @@ clientReplyContext::storeNotOKTransferDone() const
     assert(mem != NULL);
     assert(http->request != NULL);
     /* mem->reply was wrong because it uses the UPSTREAM header length!!! */
-    HttpReply const *reply = mem->getReply();
+    HttpReply const *curReply = mem->getReply();
 
     if (headers_sz == 0)
         /* haven't found end of headers yet */
@@ -1029,9 +1029,9 @@ clientReplyContext::storeNotOKTransferDone() const
 
     int sending = SENDING_BODY;
 
-    if (reply->sline.status == HTTP_NO_CONTENT ||
-            reply->sline.status == HTTP_NOT_MODIFIED ||
-            reply->sline.status < HTTP_OK ||
+    if (curReply->sline.status == HTTP_NO_CONTENT ||
+            curReply->sline.status == HTTP_NOT_MODIFIED ||
+            curReply->sline.status < HTTP_OK ||
             http->request->method == METHOD_HEAD)
         sending = SENDING_HDRSONLY;
 
@@ -1040,10 +1040,10 @@ clientReplyContext::storeNotOKTransferDone() const
      * If we are sending a body and we don't have a content-length,
      * then we must wait for the object to become STORE_OK.
      */
-    if (reply->content_length < 0)
+    if (curReply->content_length < 0)
         return 0;
 
-    int64_t expectedLength = reply->content_length + http->out.headers_sz;
+    int64_t expectedLength = curReply->content_length + http->out.headers_sz;
 
     if (http->out.size < expectedLength)
         return 0;
@@ -1277,11 +1277,11 @@ clientReplyContext::buildReplyHeader()
             /* TODO: if maxage or s-maxage is present, don't do this */
 
             if (squid_curtime - http->storeEntry()->timestamp >= 86400) {
-                char tempbuf[512];
-                snprintf (tempbuf, sizeof(tempbuf), "%s %s %s",
+                char tbuf[512];
+                snprintf (tbuf, sizeof(tbuf), "%s %s %s",
                           "113", ThisCache,
                           "This cache hit is still fresh and more than 1 day old");
-                hdr->putStr(HDR_WARNING, tempbuf);
+                hdr->putStr(HDR_WARNING, tbuf);
             }
         }
     }
@@ -1642,7 +1642,7 @@ clientReplyContext::doGetMoreData()
     /* We still have to do store logic processing - vary, cache hit etc */
     if (http->storeEntry() != NULL) {
         /* someone found the object in the cache for us */
-        StoreIOBuffer tempBuffer;
+        StoreIOBuffer localTempBuffer;
 
         http->storeEntry()->lock();
 
@@ -1675,10 +1675,10 @@ clientReplyContext::doGetMoreData()
             comm_set_tos(http->getConn()->fd, Config.zph.tos_local_hit);
         }
 #endif /* USE_ZPH_QOS */
-        tempBuffer.offset = reqofs;
-        tempBuffer.length = getNextNode()->readBuffer.length;
-        tempBuffer.data = getNextNode()->readBuffer.data;
-        storeClientCopy(sc, http->storeEntry(), tempBuffer, CacheHit, this);
+        localTempBuffer.offset = reqofs;
+        localTempBuffer.length = getNextNode()->readBuffer.length;
+        localTempBuffer.data = getNextNode()->readBuffer.data;
+        storeClientCopy(sc, http->storeEntry(), localTempBuffer, CacheHit, this);
     } else {
         /* MISS CASE, http->logType is already set! */
         processMiss();
@@ -1730,17 +1730,17 @@ clientReplyContext::sendStreamError(StoreIOBuffer const &result)
      * client socket!
      */
     debugs(88, 5, "clientReplyContext::sendStreamError: A stream error has occured, marking as complete and sending no data.");
-    StoreIOBuffer tempBuffer;
+    StoreIOBuffer localTempBuffer;
     flags.complete = 1;
-    tempBuffer.flags.error = result.flags.error;
+    localTempBuffer.flags.error = result.flags.error;
     clientStreamCallback((clientStreamNode*)http->client_stream.head->data, http, NULL,
-                         tempBuffer);
+                         localTempBuffer);
 }
 
 void
 clientReplyContext::pushStreamData(StoreIOBuffer const &result, char *source)
 {
-    StoreIOBuffer tempBuffer;
+    StoreIOBuffer localTempBuffer;
 
     if (result.length == 0) {
         debugs(88, 5, "clientReplyContext::pushStreamData: marking request as complete due to 0 length store result");
@@ -1748,14 +1748,14 @@ clientReplyContext::pushStreamData(StoreIOBuffer const &result, char *source)
     }
 
     assert(result.offset - headers_sz == next()->readBuffer.offset);
-    tempBuffer.offset = result.offset - headers_sz;
-    tempBuffer.length = result.length;
+    localTempBuffer.offset = result.offset - headers_sz;
+    localTempBuffer.length = result.length;
 
-    if (tempBuffer.length)
-        tempBuffer.data = source;
+    if (localTempBuffer.length)
+        localTempBuffer.data = source;
 
     clientStreamCallback((clientStreamNode*)http->client_stream.head->data, http, NULL,
-                         tempBuffer);
+                         localTempBuffer);
 }
 
 clientStreamNode *
@@ -1893,7 +1893,7 @@ clientReplyContext::processReplyAccessResult(bool accessAllowed)
     assert (!flags.headersSent);
     flags.headersSent = true;
 
-    StoreIOBuffer tempBuffer;
+    StoreIOBuffer localTempBuffer;
     char *buf = next()->readBuffer.data;
     char *body_buf = buf + reply->hdr_sz;
 
@@ -1907,20 +1907,20 @@ clientReplyContext::processReplyAccessResult(bool accessAllowed)
     if (next()->readBuffer.offset != 0) {
         if (next()->readBuffer.offset > body_size) {
             /* Can't use any of the body we received. send nothing */
-            tempBuffer.length = 0;
-            tempBuffer.data = NULL;
+            localTempBuffer.length = 0;
+            localTempBuffer.data = NULL;
         } else {
-            tempBuffer.length = body_size - next()->readBuffer.offset;
-            tempBuffer.data = body_buf + next()->readBuffer.offset;
+            localTempBuffer.length = body_size - next()->readBuffer.offset;
+            localTempBuffer.data = body_buf + next()->readBuffer.offset;
         }
     } else {
-        tempBuffer.length = body_size;
-        tempBuffer.data = body_buf;
+        localTempBuffer.length = body_size;
+        localTempBuffer.data = body_buf;
     }
 
     /* TODO??: move the data in the buffer back by the request header size */
     clientStreamCallback((clientStreamNode *)http->client_stream.head->data,
-                         http, reply, tempBuffer);
+                         http, reply, localTempBuffer);
 
     return;
 }
@@ -2031,7 +2031,7 @@ clientReplyContext::sendMoreData (StoreIOBuffer result)
 /* Using this breaks the client layering just a little!
  */
 void
-clientReplyContext::createStoreEntry(const HttpRequestMethod& m, request_flags flags)
+clientReplyContext::createStoreEntry(const HttpRequestMethod& m, request_flags reqFlags)
 {
     assert(http != NULL);
     /*
@@ -2042,7 +2042,7 @@ clientReplyContext::createStoreEntry(const HttpRequestMethod& m, request_flags f
     if (http->request == NULL)
         http->request = HTTPMSGLOCK(new HttpRequest(m, PROTO_NONE, null_string));
 
-    StoreEntry *e = storeCreateEntry(http->uri, http->log_uri, flags, m);
+    StoreEntry *e = storeCreateEntry(http->uri, http->log_uri, reqFlags, m);
 
     sc = storeClientListAdd(e, this);
 
@@ -2065,7 +2065,7 @@ clientReplyContext::createStoreEntry(const HttpRequestMethod& m, request_flags f
     //    storeClientCopy(http->sc, e, 0, HTTP_REQBUF_SZ, http->reqbuf,
     //        SendMoreData, this);
     /* So, we mark the store logic as complete */
-    this->flags.storelogiccomplete = 1;
+    flags.storelogiccomplete = 1;
 
     /* and get the caller to request a read, from whereever they are */
     /* NOTE: after ANY data flows down the pipe, even one step,
index b1fc8786ccbf7c7289ea9d472ca013198612ff0e..e6a9228e6fd52dd24f00015cba7180ee7ae82d1e 100644 (file)
@@ -265,7 +265,7 @@ private:
 
 typedef enum {
     COMM_CB_READ = 1,
-    COMM_CB_DERIVED,
+    COMM_CB_DERIVED
 } comm_callback_t;
 
 struct _fd_debug_t {
index da68d6c12e2ac6da278a65504efc0aea28fb7688..cdc541a8ac83840bfdf2fb8bc7afcc1456ac8986 100644 (file)
@@ -554,7 +554,7 @@ ErrorState::Dump(MemBuf * mb)
     str.Printf("HTTP Request:\r\n");
 
     if (NULL != request) {
-        Packer p;
+        Packer pck;
         String urlpath_or_slash;
 
         if (request->urlpath.size() != 0)
@@ -566,9 +566,9 @@ ErrorState::Dump(MemBuf * mb)
                    RequestMethodStr(request->method),
                    SQUIDSTRINGPRINT(urlpath_or_slash),
                    request->http_ver.major, request->http_ver.minor);
-        packerToMemInit(&p, &str);
-        request->header.packInto(&p);
-        packerClean(&p);
+        packerToMemInit(&pck, &str);
+        request->header.packInto(&pck);
+        packerClean(&pck);
     } else if (request_hdrs) {
         p = request_hdrs;
     } else {
@@ -738,7 +738,7 @@ ErrorState::Convert(char token)
     case 'R':
 
         if (NULL != request) {
-            Packer p;
+            Packer pck;
             String urlpath_or_slash;
 
             if (request->urlpath.size() != 0)
@@ -750,9 +750,9 @@ ErrorState::Convert(char token)
                       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 ebf2df411efddaed1ecdc4bced752c6440d93b02..472887abda54e34f692204ab1edb56c6262ce943 100644 (file)
@@ -1004,7 +1004,7 @@ ESIContext::start(const char *el, const char **attr, size_t attrCount)
     char localbuf [HTTP_REQBUF_SZ];
     ESIElement::Pointer element;
     int specifiedattcount = attrCount * 2;
-    char *pos;
+    char *position;
     assert (ellen < sizeof (localbuf)); /* prevent unexpected overruns. */
 
     debugs(86, 5, "ESIContext::Start: element '" << el << "' with " << specifiedattcount << " tags");
@@ -1020,33 +1020,33 @@ ESIContext::start(const char *el, const char **attr, size_t attrCount)
         localbuf[0] = '<';
         localbuf[1] = '\0';
         assert (xstrncpy (&localbuf[1], el, sizeof(localbuf) - 2));
-        pos = localbuf + strlen (localbuf);
+        position = localbuf + strlen (localbuf);
 
         for (i = 0; i < specifiedattcount && attr[i]; i += 2) {
-            *pos++ = ' ';
+            *position++ = ' ';
             /* TODO: handle thisNode gracefully */
-            assert (xstrncpy (pos, attr[i], sizeof(localbuf) + (pos - localbuf)));
-            pos += strlen (pos);
-            *pos++ = '=';
-            *pos++ = '\"';
+            assert (xstrncpy (position, attr[i], sizeof(localbuf) + (position - localbuf)));
+            position += strlen (position);
+            *position++ = '=';
+            *position++ = '\"';
             const char *chPtr = attr[i + 1];
             char ch;
             while ((ch = *chPtr++) != '\0') {
                 if (ch == '\"') {
-                    assert( xstrncpy(pos, "&quot;", sizeof(localbuf) + (pos-localbuf)) );
-                    pos += 6;
+                    assert( xstrncpy(position, "&quot;", sizeof(localbuf) + (position-localbuf)) );
+                    position += 6;
                 } else {
-                    *(pos++) = ch;
+                    *(position++) = ch;
                 }
             }
-            pos += strlen (pos);
-            *pos++ = '\"';
+            position += strlen (position);
+            *position++ = '\"';
         }
 
-        *pos++ = '>';
-        *pos = '\0';
+        *position++ = '>';
+        *position = '\0';
 
-        addLiteral (localbuf, pos - localbuf);
+        addLiteral (localbuf, position - localbuf);
         debugs(86, 5, "esi stack depth " << parserState.stackdepth);
         return;
         break;
@@ -1118,7 +1118,7 @@ ESIContext::end(const char *el)
 {
     unsigned int ellen = strlen (el);
     char localbuf [HTTP_REQBUF_SZ];
-    char *pos;
+    char *position;
 
     if (flags.error)
         /* waiting for expat to finish the buffer we gave it */
@@ -1132,10 +1132,10 @@ ESIContext::end(const char *el)
         localbuf[0] = '<';
         localbuf[1] = '/';
         assert (xstrncpy (&localbuf[2], el, sizeof(localbuf) - 3));
-        pos = localbuf + strlen (localbuf);
-        *pos++ = '>';
-        *pos = '\0';
-        addLiteral (localbuf, pos - localbuf);
+        position = localbuf + strlen (localbuf);
+        *position++ = '>';
+        *position = '\0';
+        addLiteral (localbuf, position - localbuf);
         break;
 
     case ESIElement::ESI_ELEMENT_COMMENT:
index db9181c2bad6d944d6ee264e74a1c4512581241b..ba414c6b1ddedbf908c4bfbd0ced5b646bf2a4c6 100644 (file)
@@ -592,7 +592,7 @@ public:
 
 private:
     bool validChar (char c);
-    void eval (ESIVarState::Variable *var, char const *subref, char const *found_default );
+    void eval (ESIVarState::Variable *var, char const *subref, char const *foundDefault );
     void doFunction();
     void identifyFunction();
     char *string;
@@ -611,14 +611,14 @@ private:
 };
 
 void
-ESIVariableProcessor::eval (ESIVarState::Variable *var, char const *subref, char const *found_default )
+ESIVariableProcessor::eval (ESIVarState::Variable *var, char const *subref, char const *foundDefault )
 {
     assert (var);
 
-    if (!found_default)
-        found_default = "";
+    if (!foundDefault)
+        foundDefault = "";
 
-    var->eval (*varState, subref, found_default);
+    var->eval (*varState, subref, foundDefault);
 }
 
 bool
index f07437e986d6744f381af66c0f32aa4d8a86b4ff..612b8fcd712921bba5e8210d007a96acc2f99713 100644 (file)
@@ -108,10 +108,10 @@ EventDialer::print(std::ostream &os) const
 }
 
 
-ev_entry::ev_entry(char const * name, EVH * func, void * arg, double when,
-                   int weight, bool cbdata) : name(name), func(func),
-        arg(cbdata ? cbdataReference(arg) : arg), when(when), weight(weight),
-        cbdata(cbdata)
+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 08176792514de81dbd541ac3d907bad8db17cb8f..fe1e7ed959459e8724ff30e78290d79fa05e99dd 100644 (file)
@@ -868,14 +868,14 @@ FwdState::connectStart()
 
     debugs(17, 3, "fwdConnectStart: got outgoing addr " << outgoing << ", tos " << tos);
 
-    int flags = COMM_NONBLOCKING;
+    int commFlags = COMM_NONBLOCKING;
     if (request->flags.spoof_client_ip) {
         if (!fs->_peer || !fs->_peer->options.no_tproxy)
-            flags |= COMM_TRANSPARENT;
+            commFlags |= COMM_TRANSPARENT;
         // else no tproxy today ...
     }
 
-    fd = comm_openex(SOCK_STREAM, IPPROTO_TCP, outgoing, flags, tos, url);
+    fd = comm_openex(SOCK_STREAM, IPPROTO_TCP, outgoing, commFlags, tos, url);
 
     debugs(17, 3, "fwdConnectStart: got TCP FD " << fd);
 
index 5b09fcf3ebf3f07694b65ad1c64b29c9cb1381d0..0de9f1255c563c0a67fca67e22aee87030868a6f 100644 (file)
@@ -107,7 +107,7 @@ UFSSwapDir::parseSizeL1L2()
  */
 
 void
-UFSSwapDir::reconfigure(int index, char *path)
+UFSSwapDir::reconfigure(int aIndex, char *aPath)
 {
     parseSizeL1L2();
     parseOptions(1);
@@ -154,12 +154,12 @@ UFSSwapDir::changeIO(DiskIOModule *module)
 }
 
 bool
-UFSSwapDir::optionIOParse(char const *option, const char *value, int reconfiguring)
+UFSSwapDir::optionIOParse(char const *option, const char *value, int isaReconfig)
 {
     if (strcmp(option, "IOEngine") != 0)
         return false;
 
-    if (reconfiguring)
+    if (isaReconfig)
         /* silently ignore this */
         return true;
 
@@ -431,15 +431,15 @@ UFSSwapDir::dereference(StoreEntry & e)
 }
 
 StoreIOState::Pointer
-UFSSwapDir::createStoreIO(StoreEntry &e, StoreIOState::STFNCB * file_callback, StoreIOState::STIOCB * callback, void *callback_data)
+UFSSwapDir::createStoreIO(StoreEntry &e, StoreIOState::STFNCB * file_callback, StoreIOState::STIOCB * aCallback, void *callback_data)
 {
-    return IO->create (this, &e, file_callback, callback, callback_data);
+    return IO->create (this, &e, file_callback, aCallback, callback_data);
 }
 
 StoreIOState::Pointer
-UFSSwapDir::openStoreIO(StoreEntry &e, StoreIOState::STFNCB * file_callback, StoreIOState::STIOCB * callback, void *callback_data)
+UFSSwapDir::openStoreIO(StoreEntry &e, StoreIOState::STFNCB * file_callback, StoreIOState::STIOCB * aCallback, void *callback_data)
 {
-    return IO->open (this, &e, file_callback, callback, callback_data);
+    return IO->open (this, &e, file_callback, aCallback, callback_data);
 }
 
 int
@@ -489,50 +489,50 @@ UFSSwapDir::swapSubDir(int subdirn)const
 }
 
 int
-UFSSwapDir::createDirectory(const char *path, int should_exist)
+UFSSwapDir::createDirectory(const char *aPath, int should_exist)
 {
     int created = 0;
 
     struct stat st;
     getCurrentTime();
 
-    if (0 == ::stat(path, &st)) {
+    if (0 == ::stat(aPath, &st)) {
         if (S_ISDIR(st.st_mode)) {
-            debugs(47, (should_exist ? 3 : 1), path << " exists");
+            debugs(47, (should_exist ? 3 : 1), aPath << " exists");
         } else {
-            fatalf("Swap directory %s is not a directory.", path);
+            fatalf("Swap directory %s is not a directory.", aPath);
         }
 
 #ifdef _SQUID_MSWIN_
 
-    } else if (0 == mkdir(path)) {
+    } else if (0 == mkdir(aPath)) {
 #else
 
-    } else if (0 == mkdir(path, 0755)) {
+    } else if (0 == mkdir(aPath, 0755)) {
 #endif
-        debugs(47, (should_exist ? 1 : 3), path << " created");
+        debugs(47, (should_exist ? 1 : 3), aPath << " created");
         created = 1;
     } else {
         fatalf("Failed to make swap directory %s: %s",
-               path, xstrerror());
+               aPath, xstrerror());
     }
 
     return created;
 }
 
 bool
-UFSSwapDir::pathIsDirectory(const char *path)const
+UFSSwapDir::pathIsDirectory(const char *aPath)const
 {
 
     struct stat sb;
 
-    if (::stat(path, &sb) < 0) {
-        debugs(47, 0, "" << path << ": " << xstrerror());
+    if (::stat(aPath, &sb) < 0) {
+        debugs(47, 0, "" << aPath << ": " << xstrerror());
         return false;
     }
 
     if (S_ISDIR(sb.st_mode) == 0) {
-        debugs(47, 0, "" << path << " is not a directory");
+        debugs(47, 0, "" << aPath << " is not a directory");
         return false;
     }
 
@@ -686,7 +686,7 @@ UFSSwapDir::addDiskRestore(const cache_key * key,
                            time_t lastref,
                            time_t lastmod,
                            u_int32_t refcount,
-                           u_int16_t flags,
+                           u_int16_t newFlags,
                            int clean)
 {
     StoreEntry *e = NULL;
@@ -707,7 +707,7 @@ UFSSwapDir::addDiskRestore(const cache_key * key,
     e->expires = expires;
     e->lastmod = lastmod;
     e->refcount = refcount;
-    e->flags = flags;
+    e->flags = newFlags;
     EBIT_SET(e->flags, ENTRY_CACHABLE);
     EBIT_CLR(e->flags, RELEASE_REQUEST);
     EBIT_CLR(e->flags, KEY_PRIVATE);
@@ -1388,10 +1388,10 @@ StoreSearchUFS::~StoreSearchUFS()
 }
 
 void
-StoreSearchUFS::next(void (callback)(void *cbdata), void *cbdata)
+StoreSearchUFS::next(void (aCallback)(void *cbdata), void *aCallbackArgs)
 {
     next();
-    callback (cbdata);
+    aCallback(aCallbackArgs);
 }
 
 bool
index 1f86970dee1d6cdd7ec4dee10d8f7574f99556aa..035e6935fa2ce11f00127e3145dc048a720bb247 100644 (file)
@@ -65,9 +65,9 @@ UFSStrategy::~UFSStrategy ()
 }
 
 StoreIOState::Pointer
-UFSStrategy::createState(SwapDir *SD, StoreEntry *e, StoreIOState::STIOCB * callback, void *callback_data) const
+UFSStrategy::createState(SwapDir *SD, StoreEntry *e, StoreIOState::STIOCB * aCallback, void *callback_data) const
 {
-    return new UFSStoreState (SD, e, callback, callback_data);
+    return new UFSStoreState (SD, e, aCallback, callback_data);
 }
 
 DiskFile::Pointer
@@ -198,28 +198,28 @@ UFSStoreState::close()
 }
 
 void
-UFSStoreState::read_(char *buf, size_t size, off_t offset, STRCB * callback, void *callback_data)
+UFSStoreState::read_(char *buf, size_t size, off_t aOffset, STRCB * aCallback, void *aCallbackData)
 {
     assert(read.callback == NULL);
     assert(read.callback_data == NULL);
     assert(!reading);
     assert(!closing);
-    assert (callback);
+    assert (aCallback);
 
     if (!theFile->canRead()) {
         debugs(79, 3, "UFSStoreState::read_: queueing read because theFile can't read");
-        queueRead (buf, size, offset, callback, callback_data);
+        queueRead (buf, size, aOffset, aCallback, aCallbackData);
         return;
     }
 
-    read.callback = callback;
-    read.callback_data = cbdataReference(callback_data);
+    read.callback = aCallback;
+    read.callback_data = cbdataReference(aCallbackData);
     debugs(79, 3, "UFSStoreState::read_: dirno " << swap_dirn  << ", fileno "<<
            std::setfill('0') << std::hex << std::uppercase << std::setw(8) << swap_filen);
-    offset_ = offset;
+    offset_ = aOffset;
     read_buf = buf;
     reading = true;
-    theFile->read(new ReadRequest(buf,offset,size));
+    theFile->read(new ReadRequest(buf,aOffset,size));
 }
 
 
@@ -232,7 +232,7 @@ UFSStoreState::read_(char *buf, size_t size, off_t offset, STRCB * callback, voi
  * code simpler and always go through the pending_writes queue.
  */
 void
-UFSStoreState::write(char const *buf, size_t size, off_t offset, FREE * free_func)
+UFSStoreState::write(char const *buf, size_t size, off_t aOffset, FREE * free_func)
 {
     debugs(79, 3, "UFSStoreState::write: dirn " << swap_dirn  << ", fileno "<<
            std::setfill('0') << std::hex << std::uppercase << std::setw(8) << swap_filen);
@@ -244,7 +244,7 @@ UFSStoreState::write(char const *buf, size_t size, off_t offset, FREE * free_fun
         return;
     }
 
-    queueWrite(buf, size, offset, free_func);
+    queueWrite(buf, size, aOffset, free_func);
     drainWriteQueue();
 }
 
@@ -311,9 +311,9 @@ UFSStoreState::readCompleted(const char *buf, int len, int errflag, RefCount<Rea
     if (len > 0)
         offset_ += len;
 
-    STRCB *callback = read.callback;
+    STRCB *callback_ = read.callback;
 
-    assert(callback);
+    assert(callback_);
 
     read.callback = NULL;
 
@@ -335,7 +335,7 @@ UFSStoreState::readCompleted(const char *buf, int len, int errflag, RefCount<Rea
         if (len > 0 && read_buf != buf)
             memcpy(read_buf, buf, len);
 
-        callback(cbdata, read_buf, len, this);
+        callback_(cbdata, read_buf, len, this);
     }
 
     if (flags.try_closing || (theFile != NULL && theFile->error()) )
@@ -461,7 +461,7 @@ UFSStoreState::kickReadQueue()
 }
 
 void
-UFSStoreState::queueRead(char *buf, size_t size, off_t offset, STRCB *callback, void *callback_data)
+UFSStoreState::queueRead(char *buf, size_t size, off_t aOffset, STRCB *callback_, void *callback_data_)
 {
     debugs(79, 3, "UFSStoreState::queueRead: queueing read");
     assert(opening);
@@ -469,9 +469,9 @@ UFSStoreState::queueRead(char *buf, size_t size, off_t offset, STRCB *callback,
     _queued_read *q = new _queued_read;
     q->buf = buf;
     q->size = size;
-    q->offset = offset;
-    q->callback = callback;
-    q->callback_data = cbdataReference(callback_data);
+    q->offset = aOffset;
+    q->callback = callback_;
+    q->callback_data = cbdataReference(callback_data_);
     linklistPush(&pending_reads, q);
 }
 
@@ -537,7 +537,7 @@ UFSStoreState::tryClosing()
 }
 
 void
-UFSStoreState::queueWrite(char const *buf, size_t size, off_t offset, FREE * free_func)
+UFSStoreState::queueWrite(char const *buf, size_t size, off_t aOffset, FREE * free_func)
 {
     debugs(79, 3, HERE << this << " UFSStoreState::queueWrite: queueing write of size " << size);
 
@@ -545,20 +545,20 @@ UFSStoreState::queueWrite(char const *buf, size_t size, off_t offset, FREE * fre
     q = new _queued_write;
     q->buf = buf;
     q->size = size;
-    q->offset = offset;
+    q->offset = aOffset;
     q->free_func = free_func;
     linklistPush(&pending_writes, q);
 }
 
 StoreIOState::Pointer
 UFSStrategy::open(SwapDir * SD, StoreEntry * e, StoreIOState::STFNCB * file_callback,
-                  StoreIOState::STIOCB * callback, void *callback_data)
+                  StoreIOState::STIOCB * aCallback, void *callback_data)
 {
     assert (((UFSSwapDir *)SD)->IO == this);
     debugs(79, 3, "UFSStrategy::open: fileno "<< std::setfill('0') << std::hex << std::uppercase << std::setw(8) << e->swap_filen);
 
     /* to consider: make createstate a private UFSStrategy call */
-    StoreIOState::Pointer sio = createState (SD, e, callback, callback_data);
+    StoreIOState::Pointer sio = createState (SD, e, aCallback, callback_data);
 
     sio->mode |= O_RDONLY;
 
@@ -587,7 +587,7 @@ UFSStrategy::open(SwapDir * SD, StoreEntry * e, StoreIOState::STFNCB * file_call
 
 StoreIOState::Pointer
 UFSStrategy::create(SwapDir * SD, StoreEntry * e, StoreIOState::STFNCB * file_callback,
-                    StoreIOState::STIOCB * callback, void *callback_data)
+                    StoreIOState::STIOCB * aCallback, void *callback_data)
 {
     assert (((UFSSwapDir *)SD)->IO == this);
     /* Allocate a number */
@@ -596,7 +596,7 @@ UFSStrategy::create(SwapDir * SD, StoreEntry * e, StoreIOState::STFNCB * file_ca
 
     /* Shouldn't we handle a 'bitmap full' error here? */
 
-    StoreIOState::Pointer sio = createState (SD, e, callback, callback_data);
+    StoreIOState::Pointer sio = createState (SD, e, aCallback, callback_data);
 
     sio->mode |= O_WRONLY | O_CREAT | O_TRUNC;
 
index 558410e68b1febb8eab41f7e417b7aeccba5aa84..02d66c4c98cd8242418dd169fa46c19371c3fb9e 100644 (file)
@@ -783,7 +783,7 @@ RebuildState::getNextFile(sfileno * filn_p, int *size)
 }
 
 void
-RebuildState::next(void (callback)(void *cbdata), void *cbdata)
+RebuildState::next(void (aCallback)(void *aCallbackDataarg), void *aCallbackData)
 {
     /* for now, we don't cache at all */
     speed = 1;
@@ -792,7 +792,7 @@ RebuildState::next(void (callback)(void *cbdata), void *cbdata)
     while (!isDone() && currentEntry() == NULL)
         rebuildStep();
 
-    callback(cbdata);
+    aCallback(aCallbackData);
 }
 
 bool
index f1e2fb4a17250da9e4383fa301434ab70e2e0122..7aebd10ad2951d857a982d0d8fc09fae7c23f200 100644 (file)
@@ -898,7 +898,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;
 
@@ -916,12 +916,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';
 
@@ -3924,10 +3924,10 @@ FtpStateData::printfReplyBody(const char *fmt, ...)
  * which should be sent to either StoreEntry, or to ICAP...
  */
 void
-FtpStateData::writeReplyBody(const char *data, size_t len)
+FtpStateData::writeReplyBody(const char *dataToWrite, size_t dataLength)
 {
-    debugs(9, 5, HERE << "writing " << len << " bytes to the reply");
-    addVirginReplyBody(data, len);
+    debugs(9, 5, HERE << "writing " << dataLength << " bytes to the reply");
+    addVirginReplyBody(dataToWrite, dataLength);
 }
 
 /**
index c97d572f4bfc5198c78166544f0fff36c12a8fbf..74264b3a66f8b0dd1c2811171cd065cfd7b67e60 100644 (file)
@@ -1221,22 +1221,22 @@ HttpStateData::decodeAndWriteReplyBody()
 {
     const char *data = NULL;
     int len;
-    bool status = false;
+    bool wasThereAnException = false;
     assert(flags.chunked);
     assert(httpChunkDecoder);
     SQUID_ENTER_THROWING_CODE();
     MemBuf decodedData;
     decodedData.init();
-    const bool done = httpChunkDecoder->parse(readBuf,&decodedData);
+    const bool doneParsing = httpChunkDecoder->parse(readBuf,&decodedData);
     len = decodedData.contentSize();
     data=decodedData.content();
     addVirginReplyBody(data, len);
-    if (done) {
+    if (doneParsing) {
         lastChunk = 1;
         flags.do_next_read = 0;
     }
-    SQUID_EXIT_THROWING_CODE(status);
-    return status;
+    SQUID_EXIT_THROWING_CODE(wasThereAnException);
+    return wasThereAnException;
 }
 
 /**
@@ -1350,10 +1350,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
@@ -1363,13 +1363,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)));
     }
@@ -1895,28 +1895,28 @@ HttpStateData::decideIfWeDoRanges (HttpRequest * orig_request)
 /* build request prefix and append it to a given MemBuf;
  * return the length of the prefix */
 mb_size_t
-HttpStateData::buildRequestPrefix(HttpRequest * request,
-                                  HttpRequest * orig_request,
-                                  StoreEntry * entry,
+HttpStateData::buildRequestPrefix(HttpRequest * aRequest,
+                                  HttpRequest * original_request,
+                                  StoreEntry * sentry,
                                   MemBuf * mb,
-                                  http_state_flags flags)
+                                  http_state_flags stateFlags)
 {
     const int offset = mb->size;
     HttpVersion httpver(1, 0);
     mb->Printf("%s %s HTTP/%d.%d\r\n",
-               RequestMethodStr(request->method),
-               request->urlpath.size() ? request->urlpath.termedBuf() : "/",
+               RequestMethodStr(aRequest->method),
+               aRequest->urlpath.size() ? aRequest->urlpath.termedBuf() : "/",
                httpver.major,httpver.minor);
     /* build and pack headers */
     {
         HttpHeader hdr(hoRequest);
         Packer p;
-        httpBuildRequestHeader(request, orig_request, entry, &hdr, flags);
+        httpBuildRequestHeader(aRequest, original_request, sentry, &hdr, stateFlags);
 
-        if (request->flags.pinned && request->flags.connection_auth)
-            request->flags.auth_sent = 1;
+        if (aRequest->flags.pinned && aRequest->flags.connection_auth)
+            aRequest->flags.auth_sent = 1;
         else if (hdr.has(HDR_AUTHORIZATION))
-            request->flags.auth_sent = 1;
+            aRequest->flags.auth_sent = 1;
 
         packerToMemInit(&p, mb);
         hdr.packInto(&p);
index b61d4fe9919e1e465a2901ae0b79d8a2e573d518..9f0e492ba07941fb5ce676ec9cc3319659de3b92 100644 (file)
@@ -213,7 +213,7 @@ Icmp6::Recv(void)
     struct addrinfo *from = NULL;
 //    struct ip6_hdr *ip = NULL;
     static char *pkt = NULL;
-    struct icmp6_hdr *icmp6 = NULL;
+    struct icmp6_hdr *icmp6header = NULL;
     icmpEchoData *echo = NULL;
     struct timeval now;
     static pingerReplyData preply;
@@ -278,12 +278,12 @@ Icmp6::Recv(void)
     );
     */
 
-    icmp6 = (struct icmp6_hdr *) pkt;
+    icmp6header = (struct icmp6_hdr *) pkt;
     pkt += sizeof(icmp6_hdr);
 
-    if (icmp6->icmp6_type != ICMP6_ECHO_REPLY) {
+    if (icmp6header->icmp6_type != ICMP6_ECHO_REPLY) {
 
-        switch (icmp6->icmp6_type) {
+        switch (icmp6header->icmp6_type) {
         case 134:
         case 135:
         case 136:
@@ -291,15 +291,15 @@ Icmp6::Recv(void)
             break;
 
         default:
-            debugs(42, 8, HERE << preply.from << " said: " << icmp6->icmp6_type << "/" << (int)icmp6->icmp6_code << " " <<
-                   ( icmp6->icmp6_type&0x80 ? icmp6HighPktStr[(int)(icmp6->icmp6_type&0x7f)] : icmp6LowPktStr[(int)(icmp6->icmp6_type&0x7f)] )
+            debugs(42, 8, HERE << preply.from << " said: " << icmp6header->icmp6_type << "/" << (int)icmp6header->icmp6_code << " " <<
+                   ( icmp6header->icmp6_type&0x80 ? icmp6HighPktStr[(int)(icmp6header->icmp6_type&0x7f)] : icmp6LowPktStr[(int)(icmp6header->icmp6_type&0x7f)] )
                   );
         }
         return;
     }
 
-    if (icmp6->icmp6_id != icmp_ident) {
-        debugs(42, 8, HERE << "dropping Icmp6 read. IDENT check failed. ident=='" << icmp_ident << "'=='" << icmp6->icmp6_id << "'");
+    if (icmp6header->icmp6_id != icmp_ident) {
+        debugs(42, 8, HERE << "dropping Icmp6 read. IDENT check failed. ident=='" << icmp_ident << "'=='" << icmp6header->icmp6_id << "'");
         return;
     }
 
@@ -329,8 +329,8 @@ Icmp6::Recv(void)
     }
 
     Log(preply.from,
-        icmp6->icmp6_type,
-        ( icmp6->icmp6_type&0x80 ? icmp6HighPktStr[(int)(icmp6->icmp6_type&0x7f)] : icmp6LowPktStr[(int)(icmp6->icmp6_type&0x7f)] ),
+        icmp6header->icmp6_type,
+        ( icmp6header->icmp6_type&0x80 ? icmp6HighPktStr[(int)(icmp6header->icmp6_type&0x7f)] : icmp6LowPktStr[(int)(icmp6header->icmp6_type&0x7f)] ),
         preply.rtt,
         preply.hops);
 
index 554e4e4880e16a50e668eb400a6216adf2239f16..5ef34a034cbd6b9276975460798da0a6330dcac0 100644 (file)
@@ -167,7 +167,7 @@ class SignalEngine: public AsyncEngine
 {
 
 public:
-    SignalEngine(EventLoop &loop) : loop(loop) {}
+    SignalEngine(EventLoop &evtLoop) : loop(evtLoop) {}
     virtual int checkEvents(int timeout);
 
 private:
index 334304506b1c1c209bf4aef7c454780906714c1f..226712b880aa4f8a9078a7c54d3b66c08c4ab7c1 100644 (file)
@@ -504,7 +504,7 @@ memInUse(mem_type type)
 
 /* ick */
 
-static void
+void
 memFree2K(void *p)
 {
     memFree(p, MEM_2K_BUF);
@@ -522,19 +522,19 @@ memFree8K(void *p)
     memFree(p, MEM_8K_BUF);
 }
 
-static void
+void
 memFree16K(void *p)
 {
     memFree(p, MEM_16K_BUF);
 }
 
-static void
+void
 memFree32K(void *p)
 {
     memFree(p, MEM_32K_BUF);
 }
 
-static void
+void
 memFree64K(void *p)
 {
     memFree(p, MEM_64K_BUF);
index 8caeb033416d2f772670b16e4103b10ac8033138..fb8dc73614f83f56f21bffbc030147059e08b25e 100644 (file)
@@ -83,7 +83,7 @@ SQUIDCEXTERN void clientdbInit(void);
 SQUIDCEXTERN void clientdbUpdate(const IpAddress &, log_type, protocol_t, size_t);
 
 SQUIDCEXTERN int clientdbCutoffDenied(const IpAddress &);
-SQUIDCEXTERN void clientdbDump(StoreEntry *);
+void clientdbDump(StoreEntry *);
 SQUIDCEXTERN void clientdbFreeMemory(void);
 
 SQUIDCEXTERN int clientdbEstablished(const IpAddress &, int);
@@ -473,8 +473,12 @@ SQUIDCEXTERN void *memAllocString(size_t net_size, size_t * gross_size);
 SQUIDCEXTERN void *memAllocBuf(size_t net_size, size_t * gross_size);
 SQUIDCEXTERN void *memReallocBuf(void *buf, size_t net_size, size_t * gross_size);
 SQUIDCEXTERN void memFree(void *, int type);
-SQUIDCEXTERN void memFree4K(void *);
-SQUIDCEXTERN void memFree8K(void *);
+void memFree2K(void *);
+void memFree4K(void *);
+void memFree8K(void *);
+void memFree16K(void *);
+void memFree32K(void *);
+void memFree64K(void *);
 SQUIDCEXTERN void memFreeString(size_t size, void *);
 SQUIDCEXTERN void memFreeBuf(size_t size, void *);
 SQUIDCEXTERN FREE *memFreeBufFunc(size_t size);
index cb67d2cd272645bedbb854677a3265572165f425..693032fea3797f5fa24e7befae7202d11bfcd41c 100644 (file)
@@ -1094,12 +1094,12 @@ statAvgTick(void *notused)
 
     if ((NCountHist % COUNT_INTERVAL) == 0) {
         /* we have an hours worth of readings.  store previous hour */
-        StatCounters *t = &CountHourHist[0];
-        StatCounters *p = &CountHourHist[1];
-        StatCounters *c = &CountHist[N_COUNT_HIST - 1];
+        StatCounters *t2 = &CountHourHist[0];
+        StatCounters *p2 = &CountHourHist[1];
+        StatCounters *c2 = &CountHist[N_COUNT_HIST - 1];
         statCountersClean(CountHourHist + N_COUNT_HOUR_HIST - 1);
-        xmemmove(p, t, (N_COUNT_HOUR_HIST - 1) * sizeof(StatCounters));
-        statCountersCopy(t, c);
+        xmemmove(p2, t2, (N_COUNT_HOUR_HIST - 1) * sizeof(StatCounters));
+        statCountersCopy(t2, c2);
         NCountHourHist++;
     }
 
index 5d0baa815f07ac20955d1cffbba431f5a67f1f60..6db9e320f7993cdfca94f4cc8a082c5068422a7a 100644 (file)
@@ -355,10 +355,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;
 
@@ -1609,12 +1609,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 */
index f699cdd2a0c6182d264b82e984b858f9d5bf68e1..13592577e2dbb47e13d6887a7f3367a74473ab7c 100644 (file)
@@ -704,7 +704,7 @@ StoreController::get
 void
 
 StoreController::get
-(String const key, STOREGETCLIENT callback, void *cbdata)
+(String const key, STOREGETCLIENT aCallback, void *aCallbackData)
 {
     fatal("not implemented");
 }
@@ -781,7 +781,7 @@ StoreHashIndex::get
 void
 
 StoreHashIndex::get
-(String const key, STOREGETCLIENT callback, void *cbdata)
+(String const key, STOREGETCLIENT aCallback, void *aCallbackData)
 {
     fatal("not implemented");
 }
@@ -918,10 +918,10 @@ StoreSearchHashIndex::~StoreSearchHashIndex()
 {}
 
 void
-StoreSearchHashIndex::next(void (callback)(void *cbdata), void *cbdata)
+StoreSearchHashIndex::next(void (aCallback)(void *), void *aCallbackData)
 {
     next();
-    callback (cbdata);
+    aCallback (aCallbackData);
 }
 
 bool
index 1486450ee08cd8b7cf94eea259e1ee37eadf259b..f3b16aec26ffa56d99d1c6a9891187307e23556e 100644 (file)
@@ -53,7 +53,7 @@ unlinkdUnlink(const char *path)
 {
     char buf[MAXPATHLEN];
     int l;
-    int x;
+    int bytes_written;
     static int queuelen = 0;
 
     if (unlinkd_wfd < 0) {
@@ -98,15 +98,15 @@ unlinkdUnlink(const char *path)
     * decrement the queue size by the number of newlines read.
     */
     if (queuelen > 0) {
-        int x;
+        int bytes_read;
         int i;
         char rbuf[512];
-        x = read(unlinkd_rfd, rbuf, 511);
+        bytes_read = read(unlinkd_rfd, rbuf, 511);
 
-        if (x > 0) {
-            rbuf[x] = '\0';
+        if (bytes_read > 0) {
+            rbuf[bytes_read] = '\0';
 
-            for (i = 0; i < x; i++)
+            for (i = 0; i < bytes_read; i++)
                 if ('\n' == rbuf[i])
                     queuelen--;
 
@@ -118,14 +118,14 @@ unlinkdUnlink(const char *path)
     assert(l < MAXPATHLEN);
     xstrncpy(buf, path, MAXPATHLEN);
     buf[l++] = '\n';
-    x = write(unlinkd_wfd, buf, l);
+    bytes_written = write(unlinkd_wfd, buf, l);
 
-    if (x < 0) {
+    if (bytes_written < 0) {
         debugs(2, 1, "unlinkdUnlink: write FD " << unlinkd_wfd << " failed: " << xstrerror());
         safeunlink(path, 0);
         return;
-    } else if (x != l) {
-        debugs(2, 1, "unlinkdUnlink: FD " << unlinkd_wfd << " only wrote " << x << " of " << l << " bytes");
+    } else if (bytes_written != l) {
+        debugs(2, 1, "unlinkdUnlink: FD " << unlinkd_wfd << " only wrote " << bytes_written << " of " << l << " bytes");
         safeunlink(path, 0);
         return;
     }
index 34fcf7f0768471572438a8cbcd0e18bc7e60a756..ff7f52c25aad69e08347f644340de40b61a47e89 100644 (file)
@@ -49,8 +49,8 @@ class WhoisState
 
 public:
     ~WhoisState();
-    void readReply (int fd, char *buf, size_t len, comm_err_t flag, int xerrno);
-    void setReplyToOK(StoreEntry *entry);
+    void readReply (int fd, char *aBuffer, size_t aBufferLength, comm_err_t flag, int xerrno);
+    void setReplyToOK(StoreEntry *sentry);
     StoreEntry *entry;
     HttpRequest *request;
     FwdState::Pointer fwd;
@@ -124,17 +124,17 @@ whoisReadReply(int fd, char *buf, size_t len, comm_err_t flag, int xerrno, void
 }
 
 void
-WhoisState::setReplyToOK(StoreEntry *entry)
+WhoisState::setReplyToOK(StoreEntry *sentry)
 {
     HttpReply *reply = new HttpReply;
-    entry->buffer();
+    sentry->buffer();
     HttpVersion version(1, 0);
     reply->setHeaders(version, HTTP_OK, "Gatewaying", "text/plain", -1, -1, -2);
-    entry->replaceHttpReply(reply);
+    sentry->replaceHttpReply(reply);
 }
 
 void
-WhoisState::readReply (int fd, char *buf, size_t len, comm_err_t flag, int xerrno)
+WhoisState::readReply (int fd, char *aBuffer, size_t aBufferLength, comm_err_t flag, int xerrno)
 {
     int do_next_read = 0;
 
@@ -144,27 +144,27 @@ WhoisState::readReply (int fd, char *buf, size_t len, comm_err_t flag, int xerrn
         return;
     }
 
-    buf[len] = '\0';
-    debugs(75, 3, "whoisReadReply: FD " << fd << " read " << len << " bytes");
-    debugs(75, 5, "{" << buf << "}");
+    aBuffer[aBufferLength] = '\0';
+    debugs(75, 3, "whoisReadReply: FD " << fd << " read " << aBufferLength << " bytes");
+    debugs(75, 5, "{" << aBuffer << "}");
 
-    if (flag == COMM_OK && len > 0) {
+    if (flag == COMM_OK && aBufferLength > 0) {
         if (!dataWritten)
             setReplyToOK(entry);
 
-        kb_incr(&statCounter.server.all.kbytes_in, len);
+        kb_incr(&statCounter.server.all.kbytes_in, aBufferLength);
 
-        kb_incr(&statCounter.server.http.kbytes_in, len);
+        kb_incr(&statCounter.server.http.kbytes_in, aBufferLength);
 
         /* No range support, we always grab it all */
         dataWritten = true;
 
-        entry->append(buf, len);
+        entry->append(aBuffer, aBufferLength);
 
         entry->flush();
 
         do_next_read = 1;
-    } else if (flag != COMM_OK || len < 0) {
+    } else if (flag != COMM_OK || aBufferLength < 0) {
         debugs(50, 2, "whoisReadReply: FD " << fd << ": read failure: " << xstrerror() << ".");
 
         if (ignoreErrno(errno)) {
@@ -194,7 +194,7 @@ WhoisState::readReply (int fd, char *buf, size_t len, comm_err_t flag, int xerrn
     }
 
     if (do_next_read)
-        comm_read(fd, buf, BUFSIZ, whoisReadReply, this);
+        comm_read(fd, aBuffer, BUFSIZ, whoisReadReply, this);
 }
 
 static void
index 3e2f99461b192d02380796e4c6810adc788fd448..25325c6f7d71f636e9c79d8bd4676ae43294d9be 100644 (file)
@@ -520,13 +520,13 @@ main(int argc, char *argv[])
         iaddr.SetPort(port);
 
         if (client_comm_connect(conn, iaddr, ping ? &tv1 : NULL) < 0) {
-            char buf[MAX_IPSTRLEN];
-            iaddr.ToURL(buf, MAX_IPSTRLEN);
+            char hostnameBuf[MAX_IPSTRLEN];
+            iaddr.ToURL(hostnameBuf, MAX_IPSTRLEN);
             if (errno == 0) {
-                fprintf(stderr, "client: ERROR: Cannot connect to %s: Host unknown.\n", buf);
+                fprintf(stderr, "client: ERROR: Cannot connect to %s: Host unknown.\n", hostnameBuf);
             } else {
                 char tbuf[BUFSIZ];
-                snprintf(tbuf, BUFSIZ, "client: ERROR: Cannot connect to %s", buf);
+                snprintf(tbuf, BUFSIZ, "client: ERROR: Cannot connect to %s", hostnameBuf);
                 perror(tbuf);
             }
             exit(1);