From: Automatic source maintenance Date: Sun, 7 Mar 2010 01:13:52 +0000 (-0700) Subject: SourceFormat Enforcement X-Git-Tag: SQUID_3_2_0_1~376 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a0133f1027b629da7f5c5e80d4ad3cc7727c1de5;p=thirdparty%2Fsquid.git SourceFormat Enforcement --- diff --git a/src/HttpHeaderTools.cc b/src/HttpHeaderTools.cc index 2924e85817..4ae9bfa53b 100644 --- a/src/HttpHeaderTools.cc +++ b/src/HttpHeaderTools.cc @@ -342,15 +342,15 @@ httpHeaderParseQuotedString(const char *start, String *val) pos = start + 1; while (*pos != '"') { - bool quoted = (*pos == '\\'); - if (quoted) - pos++; + bool quoted = (*pos == '\\'); + if (quoted) + pos++; if (!*pos) { debugs(66, 2, "failed to parse a quoted-string header field near '" << start << "'"); val->clean(); return 0; } - end = pos + strcspn(pos + quoted, "\"\\") + quoted; + end = pos + strcspn(pos + quoted, "\"\\") + quoted; val->append(pos, end-pos); pos = end; } diff --git a/src/auth/digest/auth_digest.cc b/src/auth/digest/auth_digest.cc index d4dc4064d2..a884b62500 100644 --- a/src/auth/digest/auth_digest.cc +++ b/src/auth/digest/auth_digest.cc @@ -533,8 +533,8 @@ digestScheme::done() helperShutdown(digestauthenticators); if (DigestFieldsInfo) { - httpHeaderDestroyFieldsInfo(DigestFieldsInfo, DIGEST_ENUM_END); - DigestFieldsInfo = NULL; + httpHeaderDestroyFieldsInfo(DigestFieldsInfo, DIGEST_ENUM_END); + DigestFieldsInfo = NULL; } authdigest_initialised = 0; @@ -1126,27 +1126,27 @@ AuthDigestConfig::decode(char const *proxy_auth) while (strListGetItem(&temp, ',', &item, &ilen, &pos)) { /* isolate directive name & value */ size_t nlen; - size_t vlen; + size_t vlen; if ((p = (const char *)memchr(item, '=', ilen)) && (p - item < ilen)) { nlen = p++ - item; - vlen = ilen - (p - item); + vlen = ilen - (p - item); } else { nlen = ilen; - vlen = 0; - } + vlen = 0; + } - /* parse value. auth-param = token "=" ( token | quoted-string ) */ + /* parse value. auth-param = token "=" ( token | quoted-string ) */ String value; - if (vlen > 0) { - if (*p == '"') { - if (!httpHeaderParseQuotedString(p, &value)) { - debugs(29, 9, "authDigestDecodeAuth: Failed to parse attribute '" << item << "' in '" << temp << "'"); - continue; - } - } else { - value.limitInit(p, vlen); - } - } else { + if (vlen > 0) { + if (*p == '"') { + if (!httpHeaderParseQuotedString(p, &value)) { + debugs(29, 9, "authDigestDecodeAuth: Failed to parse attribute '" << item << "' in '" << temp << "'"); + continue; + } + } else { + value.limitInit(p, vlen); + } + } else { debugs(29, 9, "authDigestDecodeAuth: Failed to parse attribute '" << item << "' in '" << temp << "'"); continue; } diff --git a/src/helper.cc b/src/helper.cc index bbbefa5990..b7ff5dc6a6 100644 --- a/src/helper.cc +++ b/src/helper.cc @@ -200,7 +200,7 @@ helperStatefulOpenServers(statefulhelper * hlp) return; if (hlp->childs.concurrency) - debugs(84, 0, "ERROR: concurrency= is not yet supported for stateful helpers ('" << hlp->cmdline << "')"); + debugs(84, 0, "ERROR: concurrency= is not yet supported for stateful helpers ('" << hlp->cmdline << "')"); char *progname = hlp->cmdline->key;