From: Automatic source maintenance Date: Sun, 1 Nov 2009 00:13:06 +0000 (-0600) Subject: SourceFormat Enforcement X-Git-Tag: SQUID_3_2_0_1~633 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0532051946f1b1e23aa3b96c968893a582632519;p=thirdparty%2Fsquid.git SourceFormat Enforcement --- diff --git a/lib/eui64_aton.c b/lib/eui64_aton.c index 8860b35846..fed856eb35 100644 --- a/lib/eui64_aton.c +++ b/lib/eui64_aton.c @@ -84,52 +84,52 @@ 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); } diff --git a/src/acl/Arp.h b/src/acl/Arp.h index 78ce7f3bfb..176ff94f40 100644 --- a/src/acl/Arp.h +++ b/src/acl/Arp.h @@ -39,8 +39,9 @@ #include "acl/Checklist.h" #include "splay.h" -namespace Eui { - class Eui48; +namespace Eui +{ +class Eui48; }; /// \ingroup ACLAPI diff --git a/src/acl/Eui64.h b/src/acl/Eui64.h index b019b50688..34cdca4b24 100644 --- a/src/acl/Eui64.h +++ b/src/acl/Eui64.h @@ -36,8 +36,9 @@ #include "acl/Checklist.h" #include "splay.h" -namespace Eui { - class Eui64; +namespace Eui +{ +class Eui64; }; diff --git a/src/client_side.cc b/src/client_side.cc index 266d8aa57a..d1fa9d50a5 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -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); } } diff --git a/src/errorpage.cc b/src/errorpage.cc index 3a52564335..1754494647 100644 --- a/src/errorpage.cc +++ b/src/errorpage.cc @@ -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; diff --git a/src/errorpage.h b/src/errorpage.h index 9bd3f85ce6..8a22d85fe7 100644 --- a/src/errorpage.h +++ b/src/errorpage.h @@ -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. * diff --git a/src/eui/Config.h b/src/eui/Config.h index 9dd30cef84..05d4f7afe4 100644 --- a/src/eui/Config.h +++ b/src/eui/Config.h @@ -1,7 +1,8 @@ #ifndef SQUID_EUI_CONFIG_H #define SQUID_EUI_CONFIG_H -namespace Eui { +namespace Eui +{ class EuiConfig { diff --git a/src/eui/Eui48.h b/src/eui/Eui48.h index 9dc4304d2d..54c46fdd59 100644 --- a/src/eui/Eui48.h +++ b/src/eui/Eui48.h @@ -14,7 +14,8 @@ class IpAddress; #include #endif -namespace Eui { +namespace Eui +{ class Eui48 { diff --git a/src/eui/Eui64.h b/src/eui/Eui64.h index d73b309737..f3066b901f 100644 --- a/src/eui/Eui64.h +++ b/src/eui/Eui64.h @@ -14,7 +14,8 @@ class IpAddress; #include #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(); }; diff --git a/src/ftp.cc b/src/ftp.cc index 8ed280d56e..5cc847a158 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -998,17 +998,17 @@ FtpStateData::htmlifyListEntry(const char *line) html = new MemBuf(); html->init(); html->Printf("" - "%s" - "%s" - "%s" - "%s" - "%s%s%s%s" - "\n", - prefix, href, icon, - prefix, href, html_quote(text), - parts->date, - size, - chdir, view, download, link); + "%s" + "%s" + "%s" + "%s" + "%s%s%s%s" + "\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; diff --git a/src/ip/IpAddress.cc b/src/ip/IpAddress.cc index 5a3d8966e5..482bce9372 100644 --- a/src/ip/IpAddress.cc +++ b/src/ip/IpAddress.cc @@ -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;