From: Automatic source maintenance Date: Wed, 28 Jul 2010 01:23:12 +0000 (-0600) Subject: SourceFormat Enforcement X-Git-Tag: SQUID_3_1_5_1~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa71ed2d7877d8f36a26c580895ae9b6a224cf2f;p=thirdparty%2Fsquid.git SourceFormat Enforcement --- diff --git a/src/cache_cf.cc b/src/cache_cf.cc index f2863d2521..280308d1b9 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -2840,21 +2840,20 @@ parse_IpAddress_list_token(IpAddress_list ** head, char *token) debugs(3, DBG_CRITICAL, "FATAL: IPv6 is not enabled."); self_destruct(); } - } else - if ((t = strchr(token, ':'))) { - /* host:port */ - host = token; - *t = '\0'; - port = xatos(t + 1); - - if (0 == port) - self_destruct(); - } else if ((port = strtol(token, &tmp, 10)), !*tmp) { - /* port */ - } else { - host = token; - port = 0; - } + } else if ((t = strchr(token, ':'))) { + /* host:port */ + host = token; + *t = '\0'; + port = xatos(t + 1); + + if (0 == port) + self_destruct(); + } else if ((port = strtol(token, &tmp, 10)), !*tmp) { + /* port */ + } else { + host = token; + port = 0; + } if (NULL == host) ipa.SetAnyAddr(); diff --git a/src/ip/IpIntercept.cc b/src/ip/IpIntercept.cc index e35aabe7df..5221a0f422 100644 --- a/src/ip/IpIntercept.cc +++ b/src/ip/IpIntercept.cc @@ -451,7 +451,7 @@ IpIntercept::ProbeForTproxy(IpAddress &test) /* TPROXYv2 is not IPv6 capable. Force wildcard sockets to IPv4. Die on IPv6 IPs */ debugs(3, DBG_IMPORTANT, "Disabling IPv6 on port " << test << " (TPROXYv2 interception enabled)"); if ( test.IsIPv6() && !test.SetIPv4() ) { - debugs(3, DBG_CRITICAL, "IPv6 requires TPROXYv4 support. You only have TPROXYv2 for " << test ); + debugs(3, DBG_CRITICAL, "IPv6 requires TPROXYv4 support. You only have TPROXYv2 for " << test ); return false; } } diff --git a/src/ipcache.cc b/src/ipcache.cc index f222623465..9a45d6f01d 100644 --- a/src/ipcache.cc +++ b/src/ipcache.cc @@ -992,8 +992,7 @@ ipcacheMergeIPLists(const IpAddress *aaddrs, const int alen, ip4ptrs[num_ip4] = &aaddrs[t]; num_ip4++; } - } - else if (aaddrs[t].IsIPv6()) { + } else if (aaddrs[t].IsIPv6()) { debugs(14,8, HERE << "A[" << t << "]=IPv6 " << aaddrs[t]); // check against IPv6 pruned list for (c = 0; c <= num_ip6; c++) { @@ -1017,8 +1016,7 @@ ipcacheMergeIPLists(const IpAddress *aaddrs, const int alen, ip4ptrs[num_ip4] = &baddrs[t]; num_ip4++; } - } - else if (baddrs[t].IsIPv6()) { + } else if (baddrs[t].IsIPv6()) { // check against IPv6 pruned list for (c = 0; c <= num_ip6; c++) { if (ip6ptrs[c] && baddrs[t] == *ip6ptrs[c]) break; // duplicate.