From: Automatic source maintenance Date: Thu, 28 Oct 2010 00:17:18 +0000 (-0600) Subject: SourceFormat Enforcement X-Git-Tag: take1~132 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b59e68479344ed8644b36a43a0ed6837abd7a254;p=thirdparty%2Fsquid.git SourceFormat Enforcement --- diff --git a/doc/debug-sections.txt b/doc/debug-sections.txt index 5966a87046..70254fdb05 100644 --- a/doc/debug-sections.txt +++ b/doc/debug-sections.txt @@ -50,7 +50,6 @@ section 21 Time Functions section 22 Refresh Calculation section 23 URL Parsing section 23 URL Scheme parsing -section 24 Low-level String-Buffer functions section 25 MIME Parsing and Internal Icons section 25 MiME Header Parsing section 26 Secure Sockets Layer Proxy diff --git a/src/HttpRequest.cc b/src/HttpRequest.cc index acac10511c..4cd07fdaad 100644 --- a/src/HttpRequest.cc +++ b/src/HttpRequest.cc @@ -598,8 +598,8 @@ bool HttpRequest::conditional() const { return flags.ims || - header.has(HDR_IF_MATCH) || - header.has(HDR_IF_NONE_MATCH); + header.has(HDR_IF_MATCH) || + header.has(HDR_IF_NONE_MATCH); } bool HttpRequest::inheritProperties(const HttpMsg *aMsg) diff --git a/src/MemBlob.cc b/src/MemBlob.cc index 40b9345822..ad16dbef44 100644 --- a/src/MemBlob.cc +++ b/src/MemBlob.cc @@ -102,8 +102,8 @@ MemBlob::~MemBlob() debugs(MEMBLOB_DEBUGSECTION,9, HERE << "destructed, this=" << static_cast(this) << " id=" << id - << " capacity=" << capacity - << " size=" << size); + << " capacity=" << capacity + << " size=" << size); } /** @@ -159,7 +159,7 @@ MemBlob::memAlloc(const size_type minSize) void MemBlob::append(const char *source, const size_type n) -{ +{ if (n > 0) { // appending zero bytes is allowed but only affects the stats Must(willFit(n)); Must(source); diff --git a/src/MemBlob.h b/src/MemBlob.h index f4ea42decd..51b46d51f6 100644 --- a/src/MemBlob.h +++ b/src/MemBlob.h @@ -56,7 +56,7 @@ public: /** Refcountable, fixed-size, content-agnostic memory buffer. * - * Allocated memory block is divided into two sequential areas: + * Allocated memory block is divided into two sequential areas: * "used memory" and "available space". The used area can be filled during * construction, grows via the append() call, and can be clear()ed. * @@ -91,8 +91,7 @@ public: * \param off the end of the blob area currently used by the caller * \param n the total number of bytes the caller wants to append */ - bool canAppend(const size_type off, const size_type n) const - { + bool canAppend(const size_type off, const size_type n) const { // TODO: ignore offset (and adjust size) when the blob is not shared? return isAppendOffset(off) && willFit(n); } diff --git a/src/store.cc b/src/store.cc index ba9955da29..c4671d1aee 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1917,7 +1917,7 @@ StoreEntry::hasIfNoneMatchEtag(const HttpRequest &request) const const String reqETags = request.header.getList(HDR_IF_NONE_MATCH); // weak comparison is allowed only for HEAD or full-body GET requests const bool allowWeakMatch = !request.flags.range && - (request.method == METHOD_GET || request.method == METHOD_HEAD); + (request.method == METHOD_GET || request.method == METHOD_HEAD); return hasOneOfEtags(reqETags, allowWeakMatch); } @@ -1942,7 +1942,7 @@ StoreEntry::hasOneOfEtags(const String &reqETags, const bool allowWeakMatch) con ETag reqETag; if (etagParseInit(&reqETag, str.termedBuf())) { matched = allowWeakMatch ? etagIsWeakEqual(repETag, reqETag) : - etagIsStrongEqual(repETag, reqETag); + etagIsStrongEqual(repETag, reqETag); } } }