]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
SourceFormat enforcement
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 14 Jun 2009 12:18:00 +0000 (00:18 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 14 Jun 2009 12:18:00 +0000 (00:18 +1200)
30 files changed:
helpers/external_acl/session/squid_session.c
helpers/ntlm_auth/smb_lm/libntlmssp.c
helpers/ntlm_auth/smb_lm/smbval/smblib-priv.h
helpers/ntlm_auth/smb_lm/smbval/smblib-util.c
helpers/ntlm_auth/smb_lm/smbval/smblib.c
lib/hash.c
src/AccessLogEntry.h
src/ClientInfo.h
src/WinSvc.cc
src/acl/Tag.cc
src/acl/Tag.h
src/cache_cf.cc
src/client_side.cc
src/comm.cc
src/debug.cc
src/dns_internal.cc
src/dnsserver.cc
src/ftp.cc
src/helper.cc
src/htcp.cc
src/icp_v2.cc
src/ident/Config.h
src/ident/Ident.cc
src/ident/Ident.h
src/refresh.cc
src/snmp_core.cc
src/tunnel.cc
src/url.cc
src/wccp.cc
src/wccp2.cc

index 891ce341db8e09186ea4c3ef5fc4d522b3e2ab4c..8b5b80618b44afc927cfd772b92221cd58f698cb 100644 (file)
@@ -36,7 +36,7 @@
 #include <getopt.h>
 #endif
 
-/* At this point all Bit Types are already defined, so we must 
+/* At this point all Bit Types are already defined, so we must
    protect from multiple type definition on platform where
    __BIT_TYPES_DEFINED__ is not defined.
  */
index 6cdc16ed41b24bb53a92e06e721960fcfd133267..d6e58b54494da80e1e31092b83947244e9a431e9 100644 (file)
@@ -43,19 +43,19 @@ SMB_Handle_Type SMB_Connect_Server(SMB_Handle_Type Con_Handle, char *server, cha
 /* this one is reallllly haackiish. We really should be using anything from smblib-priv.h
  */
 static char const *SMB_Prots[] = {"PC NETWORK PROGRAM 1.0",
-                            "MICROSOFT NETWORKS 1.03",
-                            "MICROSOFT NETWORKS 3.0",
-                            "DOS LANMAN1.0",
-                            "LANMAN1.0",
-                            "DOS LM1.2X002",
-                            "LM1.2X002",
-                            "DOS LANMAN2.1",
-                            "LANMAN2.1",
-                            "Samba",
-                            "NT LM 0.12",
-                            "NT LANMAN 1.0",
-                            NULL
-                           };
+                                  "MICROSOFT NETWORKS 1.03",
+                                  "MICROSOFT NETWORKS 3.0",
+                                  "DOS LANMAN1.0",
+                                  "LANMAN1.0",
+                                  "DOS LM1.2X002",
+                                  "LM1.2X002",
+                                  "DOS LANMAN2.1",
+                                  "LANMAN2.1",
+                                  "Samba",
+                                  "NT LM 0.12",
+                                  "NT LANMAN 1.0",
+                                  NULL
+                                 };
 
 #if 0
 int SMB_Discon(SMB_Handle_Type Con_Handle, BOOL KeepHandle);
index 0530de7362d33040797937fbff8b2f18026e7ff1..b801e1d780544156385d1f3bacba56a3d4c887a4 100644 (file)
@@ -638,7 +638,7 @@ extern int SMBlib_SMB_Error;        /* last Error             */
 #endif
 
 extern SMB_Tree_Handle SMB_TreeConnect(SMB_Handle_Type con, SMB_Tree_Handle tree,
-                                char *path, char *password, char const *dev);
+                                           char *path, char *password, char const *dev);
 
 extern int SMB_Init(void);
 extern void SMB_Get_My_Name(char *name, int len);
@@ -646,7 +646,7 @@ extern int SMB_Negotiate(SMB_Handle_Type Con_Handle, char const *Prots[]);
 extern int SMB_Discon(SMB_Handle_Type Con_Handle, BOOL KeepHandle);
 
 extern int SMB_Logon_Server(SMB_Handle_Type Con_Handle, char *UserName,
-                     char *PassWord, char *UserDomain, int precrypted);
+                                char *PassWord, char *UserDomain, int precrypted);
 
 extern int SMB_Get_Error_Msg(int msg, char *msgbuf, int len);
 
index 07b7b6712b5bbfa180d95b2af198de9d6d32d9e7..b25814b1e0f32e097a80911341957c3f20b1808b 100644 (file)
@@ -60,19 +60,19 @@ static int SMB_Types[] = {SMB_P_Core,
                          };
 
 static char const *SMB_Prots[] = {"PC NETWORK PROGRAM 1.0",
-                            "MICROSOFT NETWORKS 1.03",
-                            "MICROSOFT NETWORKS 3.0",
-                            "DOS LANMAN1.0",
-                            "LANMAN1.0",
-                            "DOS LM1.2X002",
-                            "LM1.2X002",
-                            "DOS LANMAN2.1",
-                            "LANMAN2.1",
-                            "Samba",
-                            "NT LM 0.12",
-                            "NT LANMAN 1.0",
-                            NULL
-                           };
+                                  "MICROSOFT NETWORKS 1.03",
+                                  "MICROSOFT NETWORKS 3.0",
+                                  "DOS LANMAN1.0",
+                                  "LANMAN1.0",
+                                  "DOS LM1.2X002",
+                                  "LM1.2X002",
+                                  "DOS LANMAN2.1",
+                                  "LANMAN2.1",
+                                  "Samba",
+                                  "NT LM 0.12",
+                                  "NT LANMAN 1.0",
+                                  NULL
+                                 };
 
 /* Print out an SMB pkt in all its gory detail ... */
 #if 0 // DEAD CODE
index 36edea86037ffef33dcb1b677b260e9642c3e454..1e06998c9f0ee6e312b91c44b0862be3c21efe68 100644 (file)
@@ -88,7 +88,7 @@ SMB_Term()
 }
 
 /**
- * SMB_Create: Create a connection structure and return for later use 
+ * SMB_Create: Create a connection structure and return for later use
  * We have other helper routines to set variables
  */
 SMB_Handle_Type
@@ -209,8 +209,8 @@ SMB_Connect_Server(SMB_Handle_Type Con_Handle,
 /* use the handle passed                                              */
 
 char const *SMB_Prots_Restrict[] = {"PC NETWORK PROGRAM 1.0",
-                              NULL
-                             };
+                                    NULL
+                                   };
 
 
 SMB_Handle_Type
index c998a104253e4c82e86e88420743f4e11a0c565c..0db0e8476cdde357daefaed58a51f3b0088b5b3b 100644 (file)
@@ -312,7 +312,7 @@ hashFreeItems(hash_table * hid, HASHFREE * free_func)
 void
 hashFreeMemory(hash_table * hid)
 {
-    if(hid == NULL)
+    if (hid == NULL)
         return;
     if (hid->buckets)
         xfree(hid->buckets);
index ef571b758c7552997224f5f3f242728913701d54..dd35279419455410abd4527332ab46c7e667a29f 100644 (file)
@@ -69,7 +69,8 @@ public:
         icp_opcode opcode;
     } icp;
 
-    class HtcpDetails {
+    class HtcpDetails
+    {
     public:
         HtcpDetails() : opcode(NULL) {};
 
index c0d728eb7f9d2cac5e0bef4f1a9c6d4df43a8d79..52c63d0f12ca6fdd21ff5a4f159bdc2e95ebf10a 100644 (file)
@@ -6,7 +6,8 @@
 #include "enums.h"
 #include "typedefs.h"
 
-class ClientInfo {
+class ClientInfo
+{
 public:
     hash_link hash;             /* must be first */
 
index f7fc1ab6c476451d89b0083b904965471df1acc5..5bfebdcf2b6c20481957d8ae88c8cb8284d11faa 100644 (file)
@@ -537,7 +537,7 @@ int WIN32_Subsystem_Init(int * argc, char *** argv)
         safe_free(ConfigFile);
 
         /* get config file from Windows Registry */
-       if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, REGKEY, 0, KEY_QUERY_VALUE, &hndKey) == ERROR_SUCCESS) {
+        if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, REGKEY, 0, KEY_QUERY_VALUE, &hndKey) == ERROR_SUCCESS) {
             DWORD Type = 0;
             DWORD Size = 0;
             LONG Result;
index bc81eb70a490dc3d6d358d0b27ffa6d98851de5a..5641e6e3018e3a6bc396bcc6e8425510a7a436ab 100644 (file)
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
@@ -44,7 +44,7 @@ int
 ACLTagStrategy::match (ACLData<MatchType> * &data, ACLFilledChecklist *checklist)
 {
     if (checklist->conn() != NULL)
-       return data->match (checklist->request->tag.termedBuf());
+        return data->match (checklist->request->tag.termedBuf());
     return 0;
 }
 
index 5ff986a4fcc30b94cbd2aec523c6e2aa28e0143a..72330f8a035130d7a887877053968fd7f67f44eb 100644 (file)
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
@@ -52,7 +52,7 @@ public:
 
 private:
     static ACLTagStrategy Instance_;
-    ACLTagStrategy(){}
+    ACLTagStrategy() {}
 
     ACLTagStrategy&operator=(ACLTagStrategy const &);
 };
index be7315f6a177d72571062164d8af2307241fca22..f30575d5c5b7ebf9f0a20cb77a3709731daeab32 100644 (file)
@@ -585,10 +585,10 @@ configDoConfigure(void)
         }
 
         for (R = Config.Refresh; R; R = R->next) {
-             if (!R->flags.ignore_must_revalidate)
-                 continue;
-             debugs(22, 1, "WARNING: use of 'ignore-must-revalidate' in 'refresh_pattern' violates HTTP");
-             break;
+            if (!R->flags.ignore_must_revalidate)
+                continue;
+            debugs(22, 1, "WARNING: use of 'ignore-must-revalidate' in 'refresh_pattern' violates HTTP");
+            break;
         }
 
         for (R = Config.Refresh; R; R = R->next) {
index bfad70968defe00adf57aecca8b70c1e18c238fd..6e507fcd6ac78d0f5a311d57bfda2530ad8a770f 100644 (file)
@@ -3224,9 +3224,9 @@ clientHttpsConnectionsOpen(void)
 
         enter_suid();
         fd = comm_open_listener(SOCK_STREAM,
-                       IPPROTO_TCP,
-                       s->http.s,
-                       COMM_NONBLOCKING, "HTTPS Socket");
+                                IPPROTO_TCP,
+                                s->http.s,
+                                COMM_NONBLOCKING, "HTTPS Socket");
         leave_suid();
 
         if (fd < 0)
index 949a6d46aeed158f215e7f5df581034baab79d5f..d3a42948507175c1c589d2f40f07b428ee76b091 100644 (file)
@@ -613,10 +613,10 @@ comm_open(int sock_type,
 
 int
 comm_open_listener(int sock_type,
-          int proto,
-          IpAddress &addr,
-          int flags,
-          const char *note)
+                   int proto,
+                   IpAddress &addr,
+                   int flags,
+                   const char *note)
 {
     int sock = -1;
 
index 4088ba335b2674bf87990410aaee09af534ff8a2..8f29b627376258d93243fdabd3c973567745c934 100644 (file)
@@ -75,7 +75,8 @@ typedef BOOL (WINAPI * PFInitializeCriticalSectionAndSpinCount) (LPCRITICAL_SECT
 void
 _db_print(const char *format,...)
 {
-    char f[BUFSIZ]; f[0]='\0';
+    char f[BUFSIZ];
+    f[0]='\0';
     va_list args1;
     va_list args2;
     va_list args3;
index 15982731d3825f17a138c219d3806120b622dd39..72dada31a797e1ebf80153f3ee6a931b9e184ed6 100644 (file)
@@ -380,7 +380,7 @@ idnsParseWIN32SearchList(const char * Separator)
         DWORD Type = 0;
         DWORD Size = 0;
         LONG Result;
-       Result = RegQueryValueEx(hndKey, "Domain", NULL, &Type, NULL, &Size);
+        Result = RegQueryValueEx(hndKey, "Domain", NULL, &Type, NULL, &Size);
 
         if (Result == ERROR_SUCCESS && Size) {
             t = (char *) xmalloc(Size);
@@ -389,11 +389,11 @@ idnsParseWIN32SearchList(const char * Separator)
             idnsAddPathComponent(t);
             xfree(t);
         }
-       Result = RegQueryValueEx(hndKey, "SearchList", NULL, &Type, NULL, &Size);
+        Result = RegQueryValueEx(hndKey, "SearchList", NULL, &Type, NULL, &Size);
 
         if (Result == ERROR_SUCCESS && Size) {
             t = (char *) xmalloc(Size);
-           RegQueryValueEx(hndKey, "SearchList", NULL, &Type, (LPBYTE) t, &Size);
+            RegQueryValueEx(hndKey, "SearchList", NULL, &Type, (LPBYTE) t, &Size);
             token = strtok(t, Separator);
 
             while (token) {
@@ -425,11 +425,11 @@ idnsParseWIN32Registry(void)
     case _WIN_OS_WINNT:
         /* get nameservers from the Windows NT registry */
 
-       if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, REG_TCPIP_PARA, 0, KEY_QUERY_VALUE, &hndKey) == ERROR_SUCCESS) {
+        if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, REG_TCPIP_PARA, 0, KEY_QUERY_VALUE, &hndKey) == ERROR_SUCCESS) {
             DWORD Type = 0;
             DWORD Size = 0;
             LONG Result;
-           Result = RegQueryValueEx(hndKey, "DhcpNameServer", NULL, &Type, NULL, &Size);
+            Result = RegQueryValueEx(hndKey, "DhcpNameServer", NULL, &Type, NULL, &Size);
 
             if (Result == ERROR_SUCCESS && Size) {
                 t = (char *) xmalloc(Size);
@@ -478,62 +478,62 @@ idnsParseWIN32Registry(void)
         /* get nameservers from the Windows 2000 registry */
         /* search all interfaces for DNS server addresses */
 
-       if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, REG_TCPIP_PARA_INTERFACES, 0, KEY_READ, &hndKey) == ERROR_SUCCESS) {
+        if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, REG_TCPIP_PARA_INTERFACES, 0, KEY_READ, &hndKey) == ERROR_SUCCESS) {
             int i;
-           DWORD MaxSubkeyLen, InterfacesCount;
-           char *keyname;
-           FILETIME ftLastWriteTime;
-
-           if (RegQueryInfoKey(hndKey, NULL, NULL, NULL, &InterfacesCount, &MaxSubkeyLen, NULL, NULL, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) {
-               keyname = (char *) xmalloc(++MaxSubkeyLen);
-               for (i = 0; i < (int) InterfacesCount; i++) {
-                   DWORD j;
-                   j = MaxSubkeyLen;
-                   if (RegEnumKeyEx(hndKey, i, keyname, &j, NULL, NULL, NULL, &ftLastWriteTime) == ERROR_SUCCESS) {
-                       char *newkeyname;
-                       newkeyname = (char *) xmalloc(sizeof(REG_TCPIP_PARA_INTERFACES) + j + 2);
-                       strcpy(newkeyname, REG_TCPIP_PARA_INTERFACES);
-                       strcat(newkeyname, "\\");
-                       strcat(newkeyname, keyname);
-                       if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, newkeyname, 0, KEY_QUERY_VALUE, &hndKey2) == ERROR_SUCCESS) {
-                           DWORD Type = 0;
-                           DWORD Size = 0;
-                           LONG Result;
-                           Result = RegQueryValueEx(hndKey2, "DhcpNameServer", NULL, &Type, NULL, &Size);
-                           if (Result == ERROR_SUCCESS && Size) {
-                               t = (char *) xmalloc(Size);
-                               RegQueryValueEx(hndKey2, "DhcpNameServer", NULL, &Type, (LPBYTE)t, &Size);
-                               token = strtok(t, ", ");
-                               while (token) {
+            DWORD MaxSubkeyLen, InterfacesCount;
+            char *keyname;
+            FILETIME ftLastWriteTime;
+
+            if (RegQueryInfoKey(hndKey, NULL, NULL, NULL, &InterfacesCount, &MaxSubkeyLen, NULL, NULL, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) {
+                keyname = (char *) xmalloc(++MaxSubkeyLen);
+                for (i = 0; i < (int) InterfacesCount; i++) {
+                    DWORD j;
+                    j = MaxSubkeyLen;
+                    if (RegEnumKeyEx(hndKey, i, keyname, &j, NULL, NULL, NULL, &ftLastWriteTime) == ERROR_SUCCESS) {
+                        char *newkeyname;
+                        newkeyname = (char *) xmalloc(sizeof(REG_TCPIP_PARA_INTERFACES) + j + 2);
+                        strcpy(newkeyname, REG_TCPIP_PARA_INTERFACES);
+                        strcat(newkeyname, "\\");
+                        strcat(newkeyname, keyname);
+                        if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, newkeyname, 0, KEY_QUERY_VALUE, &hndKey2) == ERROR_SUCCESS) {
+                            DWORD Type = 0;
+                            DWORD Size = 0;
+                            LONG Result;
+                            Result = RegQueryValueEx(hndKey2, "DhcpNameServer", NULL, &Type, NULL, &Size);
+                            if (Result == ERROR_SUCCESS && Size) {
+                                t = (char *) xmalloc(Size);
+                                RegQueryValueEx(hndKey2, "DhcpNameServer", NULL, &Type, (LPBYTE)t, &Size);
+                                token = strtok(t, ", ");
+                                while (token) {
                                     debugs(78, 1, "Adding DHCP nameserver " << token << " from Registry");
-                                   idnsAddNameserver(token);
-                                   token = strtok(NULL, ", ");
-                               }
-                               xfree(t);
-                           }
-
-                           Result = RegQueryValueEx(hndKey2, "NameServer", NULL, &Type, NULL, &Size);
-                           if (Result == ERROR_SUCCESS && Size) {
-                               t = (char *) xmalloc(Size);
-                               RegQueryValueEx(hndKey2, "NameServer", NULL, &Type, (LPBYTE)t, &Size);
-                               token = strtok(t, ", ");
-                               while (token) {
-                                   debugs(78, 1, "Adding nameserver " << token << " from Registry");
-                                   idnsAddNameserver(token);
-                                   token = strtok(NULL, ", ");
-                               }
-
-                               xfree(t);
+                                    idnsAddNameserver(token);
+                                    token = strtok(NULL, ", ");
+                                }
+                                xfree(t);
+                            }
+
+                            Result = RegQueryValueEx(hndKey2, "NameServer", NULL, &Type, NULL, &Size);
+                            if (Result == ERROR_SUCCESS && Size) {
+                                t = (char *) xmalloc(Size);
+                                RegQueryValueEx(hndKey2, "NameServer", NULL, &Type, (LPBYTE)t, &Size);
+                                token = strtok(t, ", ");
+                                while (token) {
+                                    debugs(78, 1, "Adding nameserver " << token << " from Registry");
+                                    idnsAddNameserver(token);
+                                    token = strtok(NULL, ", ");
+                                }
+
+                                xfree(t);
                             }
 
                             RegCloseKey(hndKey2);
                         }
 
-                       xfree(newkeyname);
+                        xfree(newkeyname);
                     }
                 }
 
-               xfree(keyname);
+                xfree(keyname);
             }
 
             RegCloseKey(hndKey);
@@ -550,11 +550,11 @@ idnsParseWIN32Registry(void)
     case _WIN_OS_WINME:
         /* get nameservers from the Windows 9X registry */
 
-       if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, REG_VXD_MSTCP, 0, KEY_QUERY_VALUE, &hndKey) == ERROR_SUCCESS) {
+        if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, REG_VXD_MSTCP, 0, KEY_QUERY_VALUE, &hndKey) == ERROR_SUCCESS) {
             DWORD Type = 0;
             DWORD Size = 0;
             LONG Result;
-           Result = RegQueryValueEx(hndKey, "NameServer", NULL, &Type, NULL, &Size);
+            Result = RegQueryValueEx(hndKey, "NameServer", NULL, &Type, NULL, &Size);
 
             if (Result == ERROR_SUCCESS && Size) {
                 t = (char *) xmalloc(Size);
@@ -1370,23 +1370,23 @@ idnsInit(void)
 #if IPV6_SPECIAL_SPLITSTACK
         if ( addr.IsAnyAddr() || addr.IsIPv6() )
             DnsSocketB = comm_open_listener(SOCK_DGRAM,
-                                  IPPROTO_UDP,
-                                  addr,
-                                  COMM_NONBLOCKING,
-                                  "DNS Socket v6");
+                                            IPPROTO_UDP,
+                                            addr,
+                                            COMM_NONBLOCKING,
+                                            "DNS Socket v6");
 
         if ( addr.IsAnyAddr() || addr.IsIPv4() )
             DnsSocketA = comm_open_listener(SOCK_DGRAM,
-                                  IPPROTO_UDP,
-                                  addr,
-                                  COMM_NONBLOCKING,
-                                  "DNS Socket v4");
+                                            IPPROTO_UDP,
+                                            addr,
+                                            COMM_NONBLOCKING,
+                                            "DNS Socket v4");
 #else
-            DnsSocketA = comm_open_listener(SOCK_DGRAM,
-                                  IPPROTO_UDP,
-                                  addr,
-                                  COMM_NONBLOCKING,
-                                  "DNS Socket");
+        DnsSocketA = comm_open_listener(SOCK_DGRAM,
+                                        IPPROTO_UDP,
+                                        addr,
+                                        COMM_NONBLOCKING,
+                                        "DNS Socket");
 #endif
 
         if (DnsSocketA < 0 && DnsSocketB < 0)
@@ -1396,12 +1396,12 @@ idnsInit(void)
          * statement. Doing so messes up the internal Debug::level
          */
 #if IPV6_SPECIAL_SPLITSTACK
-        if(DnsSocketB >= 0) {
+        if (DnsSocketB >= 0) {
             port = comm_local_port(DnsSocketB);
             debugs(78, 1, "DNS Socket created at " << addr << ", FD " << DnsSocketB);
         }
 #endif
-        if(DnsSocketA >= 0) {
+        if (DnsSocketA >= 0) {
             port = comm_local_port(DnsSocketA);
             debugs(78, 1, "DNS Socket created at " << addr << ", FD " << DnsSocketA);
         }
@@ -1452,13 +1452,13 @@ idnsShutdown(void)
     if (DnsSocketA < 0 && DnsSocketB < 0)
         return;
 
-    if(DnsSocketA >= 0 ) {
+    if (DnsSocketA >= 0 ) {
         comm_close(DnsSocketA);
         DnsSocketA = -1;
     }
 
 #if IPV6_SPECIAL_SPLITSTACK
-    if(DnsSocketA >= 0 ) {
+    if (DnsSocketA >= 0 ) {
         comm_close(DnsSocketB);
         DnsSocketB = -1;
     }
index eff9b728db2a2781666a3f046c69dfea3c542fd6..648b07b5c1a9ab6c23d507077c5e954708c2673c 100644 (file)
@@ -433,7 +433,7 @@ squid_res_setservers(int reset)
         ipa.GetInAddr(_SQUID_RES_NSADDR_LIST[_SQUID_RES_NSADDR_COUNT++].sin_addr);
     } else if ( ipa.IsIPv6() ) {
 #if USE_IPV6 && defined(_SQUID_RES_NSADDR6_LIST)
-         /* because things NEVER seem to resolve in tests without _res.nscount being a total. */
+        /* because things NEVER seem to resolve in tests without _res.nscount being a total. */
         if (_SQUID_RES_NSADDR_COUNT == MAXNS) {
             fprintf(stderr, "Too many -s options, only %d are allowed\n", MAXNS);
             return;
index d5504917b5c48ab1e1f22d42e668be280cd68277..dc232e50ed66eef11c65d06f27aaa04bbd852e59 100644 (file)
@@ -534,7 +534,7 @@ FtpStateData::loginParser(const char *login, int escaped)
         *s = '\0';
 
         /* if there was a username part */
-        if(s > login) {
+        if (s > login) {
             xstrncpy(user, login, MAX_URL);
             if (escaped)
                 rfc1738_unescape(user);
@@ -548,8 +548,7 @@ FtpStateData::loginParser(const char *login, int escaped)
                 password_url = 1;
             }
         }
-    }
-    else if (login[0]) {
+    } else if (login[0]) {
         /* no password, just username */
         xstrncpy(user, login, MAX_URL);
         if (escaped)
@@ -3216,7 +3215,7 @@ ftpReadRest(FtpStateData * ftpState)
     assert(ftpState->restart_offset > 0);
 
     if (code == 350) {
-       ftpState->setCurrentOffset(ftpState->restart_offset);
+        ftpState->setCurrentOffset(ftpState->restart_offset);
         ftpSendRetr(ftpState);
     } else if (code > 0) {
         debugs(9, 3, HERE << "REST not supported");
index a85e065a51f0bfbda9147673aeec6277a8ce465a..9be0b5d8d6f33b0d961d58477dc00a833b0ac457 100644 (file)
@@ -107,7 +107,7 @@ helperOpenServers(helper * hlp)
 
     debugs(84, 1, "helperOpenServers: Starting " << need_new << "/" << hlp->n_to_start << " '" << shortname << "' processes");
 
-    if(need_new < 1) {
+    if (need_new < 1) {
         debugs(84, 1, "helperOpenServers: No '" << shortname << "' processes needed.");
     }
 
@@ -213,7 +213,7 @@ helperStatefulOpenServers(statefulhelper * hlp)
 
     debugs(84, 1, "helperOpenServers: Starting " << need_new << "/" << hlp->n_to_start << " '" << shortname << "' processes");
 
-    if(need_new < 1) {
+    if (need_new < 1) {
         debugs(84, 1, "helperStatefulOpenServers: No '" << shortname << "' processes needed.");
     }
 
index c28412bd5d9410352ed38b999ad20948970e1875..96a42281b35abb15add6274c454d72dee708c51f 100644 (file)
@@ -1488,10 +1488,10 @@ htcpInit(void)
 
     enter_suid();
     htcpInSocket = comm_open_listener(SOCK_DGRAM,
-                             IPPROTO_UDP,
-                             incomingAddr,
-                             COMM_NONBLOCKING,
-                             "HTCP Socket");
+                                      IPPROTO_UDP,
+                                      incomingAddr,
+                                      COMM_NONBLOCKING,
+                                      "HTCP Socket");
     leave_suid();
 
     if (htcpInSocket < 0)
@@ -1507,10 +1507,10 @@ htcpInit(void)
 
         enter_suid();
         htcpOutSocket = comm_open_listener(SOCK_DGRAM,
-                                  IPPROTO_UDP,
-                                  outgoingAddr,
-                                  COMM_NONBLOCKING,
-                                  "Outgoing HTCP Socket");
+                                           IPPROTO_UDP,
+                                           outgoingAddr,
+                                           COMM_NONBLOCKING,
+                                           "Outgoing HTCP Socket");
         leave_suid();
 
         if (htcpOutSocket < 0)
@@ -1708,9 +1708,9 @@ htcpLogHtcp(IpAddress &caddr, int opcode, log_type logcode, const char *url)
 {
     AccessLogEntry al;
     if (LOG_TAG_NONE == logcode)
-       return;
+        return;
     if (!Config.onoff.log_udp)
-       return;
+        return;
     al.htcp.opcode = htcpOpcodeStr[opcode];
     al.url = url;
     al.cache.caddr = caddr;
index e41c78594c8a5f3672095adab5ef2f5e70599c10..32b2e72f33df80cfdef28f637a6bda33f42208f8 100644 (file)
@@ -665,10 +665,10 @@ icpConnectionsOpen(void)
     addr = Config.Addrs.udp_incoming;
     addr.SetPort(port);
     theInIcpConnection = comm_open_listener(SOCK_DGRAM,
-                                   IPPROTO_UDP,
-                                   addr,
-                                   COMM_NONBLOCKING,
-                                   "ICP Socket");
+                                            IPPROTO_UDP,
+                                            addr,
+                                            COMM_NONBLOCKING,
+                                            "ICP Socket");
     leave_suid();
 
     if (theInIcpConnection < 0)
@@ -691,10 +691,10 @@ icpConnectionsOpen(void)
         enter_suid();
         addr.SetPort(port);
         theOutIcpConnection = comm_open_listener(SOCK_DGRAM,
-                                        IPPROTO_UDP,
-                                        addr,
-                                        COMM_NONBLOCKING,
-                                        "ICP Port");
+                              IPPROTO_UDP,
+                              addr,
+                              COMM_NONBLOCKING,
+                              "ICP Port");
         leave_suid();
 
         if (theOutIcpConnection < 0)
index 2b440223cc29ade60117fc554f05776eb4bb1737..5de6c93643854cefbb032f7eb1a442b0920d3a7c 100644 (file)
@@ -7,9 +7,11 @@
 
 #include "acl/Acl.h"
 
-namespace Ident {
+namespace Ident
+{
 
-class IdentConfig {
+class IdentConfig
+{
 public:
     acl_access *identLookup;
     time_t timeout;
index a6c84974ff6018086af6af18353f1ff72851a0fd..90014cc1f64d64f55af18d440580641a74c4ef4d 100644 (file)
@@ -41,7 +41,8 @@
 #include "ident/Ident.h"
 #include "MemBuf.h"
 
-namespace Ident {
+namespace Ident
+{
 
 #define IDENT_PORT 113
 #define IDENT_KEY_SZ 50
@@ -238,10 +239,10 @@ Ident::Start(IpAddress &me, IpAddress &my_peer, IDCB * callback, void *data)
     addr.SetPort(0); // NP: use random port for secure outbound to IDENT_PORT
 
     fd = comm_open_listener(SOCK_STREAM,
-                   IPPROTO_TCP,
-                   addr,
-                   COMM_NONBLOCKING,
-                   "ident");
+                            IPPROTO_TCP,
+                            addr,
+                            COMM_NONBLOCKING,
+                            "ident");
 
     if (fd == COMM_ERROR) {
         /* Failed to get a local socket */
@@ -266,7 +267,7 @@ Ident::Start(IpAddress &me, IpAddress &my_peer, IDCB * callback, void *data)
 void
 Ident::Init(void)
 {
-    if(ident_hash) {
+    if (ident_hash) {
         debugs(30, DBG_CRITICAL, "WARNING: Ident already initialized.");
         return;
     }
index f632b1022a410bdbc2e8c7be55d459c3997908b1..fe035f26c97a1b1b672dd983fd4907d14bebd773 100644 (file)
@@ -17,7 +17,8 @@
 
 class IpAddress;
 
-namespace Ident {
+namespace Ident
+{
 
 /**
   \ingroup IdentAPI
index 90de81ef261b3f9eadc48cd8987ac8280ecfccb0..ea3199bf9013a2a9028dd3e275568c434594ab1c 100644 (file)
@@ -273,9 +273,9 @@ refreshCheck(const StoreEntry * entry, HttpRequest * request, time_t delta)
 
     if (EBIT_TEST(entry->flags, ENTRY_REVALIDATE) && staleness > -1
 #if HTTP_VIOLATIONS
-        && !R->flags.ignore_must_revalidate
+            && !R->flags.ignore_must_revalidate
 #endif
-    ) {
+       ) {
         debugs(22, 3, "refreshCheck: YES: Must revalidate stale response");
         return STALE_MUST_REVALIDATE;
     }
index ebff8727351e4fd9ca8e2977b72259af90673e86..8fc7635cc012a3d38fa6e4097eea166cf1a0d3b7 100644 (file)
@@ -366,10 +366,10 @@ snmpConnectionOpen(void)
         Config.Addrs.snmp_incoming.SetPort(Config.Port.snmp);
         enter_suid();
         theInSnmpConnection = comm_open_listener(SOCK_DGRAM,
-                                        IPPROTO_UDP,
-                                        Config.Addrs.snmp_incoming,
-                                        COMM_NONBLOCKING,
-                                        "SNMP Port");
+                              IPPROTO_UDP,
+                              Config.Addrs.snmp_incoming,
+                              COMM_NONBLOCKING,
+                              "SNMP Port");
         leave_suid();
 
         if (theInSnmpConnection < 0)
@@ -383,10 +383,10 @@ snmpConnectionOpen(void)
             Config.Addrs.snmp_outgoing.SetPort(Config.Port.snmp);
             enter_suid();
             theOutSnmpConnection = comm_open_listener(SOCK_DGRAM,
-                                             IPPROTO_UDP,
-                                             Config.Addrs.snmp_outgoing,
-                                             COMM_NONBLOCKING,
-                                             "SNMP Port");
+                                   IPPROTO_UDP,
+                                   Config.Addrs.snmp_outgoing,
+                                   COMM_NONBLOCKING,
+                                   "SNMP Port");
             leave_suid();
 
             if (theOutSnmpConnection < 0)
index a235b9248f04ffe757f0daed83c83981bfcc98f8..cc6b813eddf9cd1c9984cdba588b7a3a2d1e764f 100644 (file)
@@ -342,7 +342,7 @@ TunnelStateData::writeServerDone(char *buf, size_t len, comm_err_t flag, int xer
 {
     debugs(26, 3, "tunnelWriteServer: FD " << server.fd() << ", " << len << " bytes written");
 
-    if(flag == COMM_ERR_CLOSING)
+    if (flag == COMM_ERR_CLOSING)
         return;
 
     /* Error? */
@@ -403,7 +403,7 @@ TunnelStateData::writeClientDone(char *buf, size_t len, comm_err_t flag, int xer
 {
     debugs(26, 3, "tunnelWriteClient: FD " << client.fd() << ", " << len << " bytes written");
 
-    if(flag == COMM_ERR_CLOSING)
+    if (flag == COMM_ERR_CLOSING)
         return;
 
     /* Error? */
index 2cad9e6fbbefeb402983e8a9c470beadbb5d51f9..8e105266bc3f57c1187f6c53e6f62a10ae11a801 100644 (file)
@@ -548,7 +548,7 @@ urlCanonicalFakeHttps(const HttpRequest * request)
     LOCAL_ARRAY(char, buf, MAX_URL);
 
     // method CONNECT and port HTTPS
-    if(request->method == METHOD_CONNECT && request->port == 443) {
+    if (request->method == METHOD_CONNECT && request->port == 443) {
         snprintf(buf, MAX_URL, "https://%s/*", request->GetHost());
         return buf;
     }
index 6b993126403da7fb97f42e141a049bca38dbfd0b..d164b9e8c9ceb2d2db14a7657c11d1c9d7bb1b47 100644 (file)
@@ -148,10 +148,10 @@ wccpConnectionOpen(void)
     Config.Wccp.address.SetPort(WCCP_PORT);
 
     theWccpConnection = comm_open_listener(SOCK_DGRAM,
-                                  IPPROTO_UDP,
-                                  Config.Wccp.address,
-                                  COMM_NONBLOCKING,
-                                  "WCCP Socket");
+                                           IPPROTO_UDP,
+                                           Config.Wccp.address,
+                                           COMM_NONBLOCKING,
+                                           "WCCP Socket");
 
     if (theWccpConnection < 0)
         fatal("Cannot open WCCP Port");
index 7d5f66cc4ff8ad78c51a53707d34ac03cc88c7dd..a3cd000058752159a8599fea5e8650a88f302dbc 100644 (file)
@@ -996,10 +996,10 @@ wccp2ConnectionOpen(void)
 
     Config.Wccp2.address.SetPort(WCCP_PORT);
     theWccp2Connection = comm_open_listener(SOCK_DGRAM,
-                                   0,
-                                   Config.Wccp2.address,
-                                   COMM_NONBLOCKING,
-                                   "WCCPv2 Socket");
+                                            0,
+                                            Config.Wccp2.address,
+                                            COMM_NONBLOCKING,
+                                            "WCCPv2 Socket");
 
     if (theWccp2Connection < 0)
         fatal("Cannot open WCCP Port");