]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
SourceFormat Enforcement
authorAutomatic source maintenance <squidadm@squid-cache.org>
Sun, 1 Nov 2009 00:13:06 +0000 (18:13 -0600)
committerAutomatic source maintenance <squidadm@squid-cache.org>
Sun, 1 Nov 2009 00:13:06 +0000 (18:13 -0600)
lib/eui64_aton.c
src/acl/Arp.h
src/acl/Eui64.h
src/client_side.cc
src/errorpage.cc
src/errorpage.h
src/eui/Config.h
src/eui/Eui48.h
src/eui/Eui64.h
src/ftp.cc
src/ip/IpAddress.cc

index 8860b35846a5ac6efb58290c000b0c2593fd50bb..fed856eb356d04b03d474edff6058e77a13bbe7e 100644 (file)
 int
 eui64_aton(const char *a, struct eui64 *e)
 {
-        int i;
-        unsigned int o0, o1, o2, o3, o4, o5, o6, o7;
+    int i;
+    unsigned int o0, o1, o2, o3, o4, o5, o6, o7;
 
-        /* canonical form */
-        i = sscanf(a, "%x-%x-%x-%x-%x-%x-%x-%x",
-            &o0, &o1, &o2, &o3, &o4, &o5, &o6, &o7);
-        if (i == EUI64_LEN)
-                goto good;
-        /* ethernet form */
-        i = sscanf(a, "%x:%x:%x:%x:%x:%x:%x:%x",
-            &o0, &o1, &o2, &o3, &o4, &o5, &o6, &o7);
-        if (i == EUI64_LEN)
-                goto good;
-        /* classic fwcontrol/dconschat form */
-        i = sscanf(a, "0x%2x%2x%2x%2x%2x%2x%2x%2x",
-            &o0, &o1, &o2, &o3, &o4, &o5, &o6, &o7);
-        if (i == EUI64_LEN)
-                goto good;
-        /* MAC format (-) */
-        i = sscanf(a, "%x-%x-%x-%x-%x-%x",
-            &o0, &o1, &o2, &o5, &o6, &o7);
-        if (i == 6) {
-                o3 = 0xff;
-                o4 = 0xfe;
-                goto good;
-        }
-        /* MAC format (:) */
-        i = sscanf(a, "%x:%x:%x:%x:%x:%x",
-            &o0, &o1, &o2, &o5, &o6, &o7);
-        if (i == 6) {
-                o3 = 0xff;
-                o4 = 0xfe;
-                goto good;
-        }
+    /* canonical form */
+    i = sscanf(a, "%x-%x-%x-%x-%x-%x-%x-%x",
+               &o0, &o1, &o2, &o3, &o4, &o5, &o6, &o7);
+    if (i == EUI64_LEN)
+        goto good;
+    /* ethernet form */
+    i = sscanf(a, "%x:%x:%x:%x:%x:%x:%x:%x",
+               &o0, &o1, &o2, &o3, &o4, &o5, &o6, &o7);
+    if (i == EUI64_LEN)
+        goto good;
+    /* classic fwcontrol/dconschat form */
+    i = sscanf(a, "0x%2x%2x%2x%2x%2x%2x%2x%2x",
+               &o0, &o1, &o2, &o3, &o4, &o5, &o6, &o7);
+    if (i == EUI64_LEN)
+        goto good;
+    /* MAC format (-) */
+    i = sscanf(a, "%x-%x-%x-%x-%x-%x",
+               &o0, &o1, &o2, &o5, &o6, &o7);
+    if (i == 6) {
+        o3 = 0xff;
+        o4 = 0xfe;
+        goto good;
+    }
+    /* MAC format (:) */
+    i = sscanf(a, "%x:%x:%x:%x:%x:%x",
+               &o0, &o1, &o2, &o5, &o6, &o7);
+    if (i == 6) {
+        o3 = 0xff;
+        o4 = 0xfe;
+        goto good;
+    }
 
-        return (-1);
+    return (-1);
 
 good:
-        e->octet[0]=o0;
-        e->octet[1]=o1;
-        e->octet[2]=o2;
-        e->octet[3]=o3;
-        e->octet[4]=o4;
-        e->octet[5]=o5;
-        e->octet[6]=o6;
-        e->octet[7]=o7;
+    e->octet[0]=o0;
+    e->octet[1]=o1;
+    e->octet[2]=o2;
+    e->octet[3]=o3;
+    e->octet[4]=o4;
+    e->octet[5]=o5;
+    e->octet[6]=o6;
+    e->octet[7]=o7;
 
-        return (0);
+    return (0);
 }
index 78ce7f3bfb8a1d1365ff35da1821ce021ffc066e..176ff94f40f4083472b37fecfb024cc997b1a28c 100644 (file)
@@ -39,8 +39,9 @@
 #include "acl/Checklist.h"
 #include "splay.h"
 
-namespace Eui {
-    class Eui48;
+namespace Eui
+{
+class Eui48;
 };
 
 /// \ingroup ACLAPI
index b019b506884a90a1942907a700e792917d03e0ae..34cdca4b245ff43cdc9c638e148af94f94fc38f3 100644 (file)
@@ -36,8 +36,9 @@
 #include "acl/Checklist.h"
 #include "splay.h"
 
-namespace Eui {
-    class Eui64;
+namespace Eui
+{
+class Eui64;
 };
 
 
index 266d8aa57a043ab0a12b6b6a47c7cff8afbbe596..d1fa9d50a5ae7e12fa2920bf0f7d24033b90ff2d 100644 (file)
@@ -3057,8 +3057,7 @@ httpAccept(int sock, int newfd, ConnectionDetail *details,
     if (Eui::TheConfig.euiLookup) {
         if (details->peer.IsIPv4()) {
             connState->peer_eui48.lookup(details->peer);
-        }
-        else if (details->peer.IsIPv6()) {
+        } else if (details->peer.IsIPv6()) {
             connState->peer_eui64.lookup(details->peer);
         }
     }
index 3a525643352398b86abc4edb5ba24f354f4f7ef6..1754494647b60bd5db4eda7649e944e844a70745 100644 (file)
@@ -657,9 +657,9 @@ ErrorState::Convert(char token, bool url_presentable)
     case 'g':
         if (url_presentable) break;
         /* FTP SERVER MESSAGE */
-        if(ftp.server_msg)
+        if (ftp.server_msg)
             wordlistCat(ftp.server_msg, &mb);
-        else if(ftp.listing) {
+        else if (ftp.listing) {
             mb.append(ftp.listing->content(), ftp.listing->contentSize());
             do_quote = 0;
         }
@@ -763,8 +763,7 @@ ErrorState::Convert(char token, bool url_presentable)
         if (url_presentable) {
             p = request ? urlCanonical(request) : url;
             debugs(0,0, "WARNING: deny_info now accepts coded tags. Use %u to get the full URL instead of %s");
-        }
-        else
+        } else
             p = visible_appname_string;
         break;
 
index 9bd3f85ce67e8531a211746672e5e24bd57d315e..8a22d85fe7dbffb2d217c66fd4106561aa8aab18 100644 (file)
@@ -106,7 +106,7 @@ private:
 
     /**
      * Map the Error page and deny_info template % codes into textual output.
-     * 
+     *
      * Several of the codes produce blocks of non-URL compatible results.
      * When processing the deny_info location URL they will be skipped.
      *
index 9dd30cef846de6e166178ffc91fc4a5b56e29f2b..05d4f7afe4dd479a13b78f9dbfa3146fc7d69ede 100644 (file)
@@ -1,7 +1,8 @@
 #ifndef SQUID_EUI_CONFIG_H
 #define SQUID_EUI_CONFIG_H
 
-namespace Eui {
+namespace Eui
+{
 
 class EuiConfig
 {
index 9dc4304d2d2f0a0d564651dbaae23aa10832e819..54c46fdd5926d8de5327798d569b932a104789e1 100644 (file)
@@ -14,7 +14,8 @@ class IpAddress;
 #include <cstring>
 #endif
 
-namespace Eui {
+namespace Eui
+{
 
 class Eui48
 {
index d73b309737485c3c220995dd0ad6c963a223ccf7..f3066b901f07b540542addd661cb990c87dbba7f 100644 (file)
@@ -14,7 +14,8 @@ class IpAddress;
 #include <sys/eui64.h>
 #endif
 
-namespace Eui {
+namespace Eui
+{
 
 /* EUI-64 is 8 bytes. */
 #if defined(EUI64_LEN)
@@ -23,7 +24,8 @@ namespace Eui {
 #define SZ_EUI64_BUF 8
 #endif
 
-class Eui64 {
+class Eui64
+{
 
 public:
     Eui64() { clear(); };
index 8ed280d56ef893b23d57bd3b8730de8919d7ec7a..5cc847a158b3daecc691d83544e57fdf83f79764 100644 (file)
@@ -998,17 +998,17 @@ FtpStateData::htmlifyListEntry(const char *line)
     html = new MemBuf();
     html->init();
     html->Printf("<tr class=\"entry\">"
-             "<td class=\"icon\"><a href=\"%s%s\">%s</a></td>"
-             "<td class=\"filename\"><a href=\"%s%s\">%s</a></td>"
-             "<td class=\"date\">%s</td>"
-             "<td class=\"size\">%s</td>"
-             "<td class=\"actions\">%s%s%s%s</td>"
-             "</tr>\n",
-             prefix, href, icon,
-             prefix, href, html_quote(text),
-             parts->date,
-             size,
-             chdir, view, download, link);
+                 "<td class=\"icon\"><a href=\"%s%s\">%s</a></td>"
+                 "<td class=\"filename\"><a href=\"%s%s\">%s</a></td>"
+                 "<td class=\"date\">%s</td>"
+                 "<td class=\"size\">%s</td>"
+                 "<td class=\"actions\">%s%s%s%s</td>"
+                 "</tr>\n",
+                 prefix, href, icon,
+                 prefix, href, html_quote(text),
+                 parts->date,
+                 size,
+                 chdir, view, download, link);
 
     ftpListPartsFree(&parts);
     return html;
@@ -1078,7 +1078,7 @@ FtpStateData::parseListing()
 
         t = htmlifyListEntry(line);
 
-        if( t != NULL) {
+        if ( t != NULL) {
             debugs(9, 7, HERE << "listing append: t = {" << t->contentSize() << ", '" << t->content() << "'}");
             listing.append(t->content(), t->contentSize());
 //leak?            delete t;
index 5a3d8966e51931572a3ed00c4bb2c6c9f8155ed3..482bce937208875ea9a45d44f6d8b9719840b1b0 100644 (file)
@@ -377,7 +377,7 @@ bool IpAddress::IsSiteLocal6() const
 bool IpAddress::IsSlaac() const
 {
 #if USE_IPV6
-    return (m_SocketAddr.sin6_addr.s6_addr32[2] & htonl(0x000000ff)) == htonl(0x000000ff) && 
+    return (m_SocketAddr.sin6_addr.s6_addr32[2] & htonl(0x000000ff)) == htonl(0x000000ff) &&
            (m_SocketAddr.sin6_addr.s6_addr32[3] & htonl(0xff000000)) == htonl(0xfe000000);
 #else
     return false;