]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
SourceFormat Enforcement
authorAutomatic source maintenance <squidadm@squid-cache.org>
Sun, 20 Nov 2011 02:30:20 +0000 (19:30 -0700)
committerAutomatic source maintenance <squidadm@squid-cache.org>
Sun, 20 Nov 2011 02:30:20 +0000 (19:30 -0700)
src/Server.cc
src/client_side_request.cc
src/format/Config.h
src/format/Format.cc
src/format/TokenTableEntry.h
src/forward.cc
src/store.cc

index f88c84946e4cdcd12d56a9eb27e8d1f57dc921c5..903e3a2134e8ff790871e00bd1cc3af0ba3e4f3e 100644 (file)
@@ -710,7 +710,7 @@ ServerStateData::resumeBodyStorage()
     if (abortOnBadEntry("store entry aborted while kick producer callback"))
         return;
 
-    if(!adaptedBodySource)
+    if (!adaptedBodySource)
         return;
 
     handleMoreAdaptedBodyAvailable();
@@ -738,7 +738,7 @@ ServerStateData::handleMoreAdaptedBodyAvailable()
     const size_t bytesWanted = entry->bytesWanted(Range<size_t>(0, contentSize));
     const size_t spaceAvailable = bytesWanted >  0 ? (bytesWanted + 1) : 0;
 
-    if (spaceAvailable < contentSize ) { 
+    if (spaceAvailable < contentSize ) {
         // No or partial body data consuming
         typedef NullaryMemFunT<ServerStateData> Dialer;
         AsyncCall::Pointer call = asyncCall(93, 5, "ServerStateData::resumeBodyStorage",
@@ -752,16 +752,16 @@ ServerStateData::handleMoreAdaptedBodyAvailable()
                "response body at offset " << adaptedBodySource->consumedSize());
         return;
     }
-    
+
     if (spaceAvailable < contentSize ) {
         debugs(11, 5, HERE << "postponing storage of " <<
                (contentSize - spaceAvailable) << " body bytes");
         contentSize = spaceAvailable;
     }
-    
+
     debugs(11,5, HERE << "storing " << contentSize << " bytes of adapted " <<
            "response body at offset " << adaptedBodySource->consumedSize());
-    
+
     BodyPipeCheckout bpc(*adaptedBodySource);
     const StoreIOBuffer ioBuf(&bpc.buf, currentOffset, contentSize);
     currentOffset += ioBuf.length;
@@ -776,8 +776,8 @@ ServerStateData::handleAdaptedBodyProductionEnded()
 {
     if (abortOnBadEntry("entry went bad while waiting for adapted body eof"))
         return;
-     // end consumption if we consumed everything
+
+    // end consumption if we consumed everything
     if (adaptedBodySource != NULL && adaptedBodySource->exhausted())
         endAdaptedBodyConsumption();
     // else resumeBodyStorage() will eventually consume the rest
index 96a643fa4a821fbbedbb639fa75c3df5e391f7da..d4bbe39ce369a925986c46c4bb491681eba83d14 100644 (file)
@@ -1683,7 +1683,7 @@ ClientHttpRequest::handleAdaptationBlock(const Adaptation::Answer &answer)
 void
 ClientHttpRequest::resumeBodyStorage()
 {
-    if(!adaptedBodySource)
+    if (!adaptedBodySource)
         return;
 
     noteMoreBodyDataAvailable(adaptedBodySource);
index e4c4882ee5d90c6cd317f48fba3e5ed47b32707a..6385f02bd92e8b3874c5c1376cf4919829a2f6d8 100644 (file)
@@ -30,7 +30,7 @@ public:
 };
 
 /// The set of custom formats defined in squid.conf
-/// 
+///
 class FmtConfig
 {
 public:
index 02eadd2947ca329ab92ad5aea92ad009d29d3e66..4c6f780260f38a134b0d0132079b6b153efb6397 100644 (file)
@@ -832,22 +832,22 @@ Format::Format::assemble(MemBuf &mb, AccessLogEntry *al, int logSequenceNumber)
                     snprintf(tmp, sizeof(tmp), "SSL_ERR=%d", al->request->errDetail);
                     out = tmp;
                 }
-            } else 
+            } else
 #endif
-            if (al->request && al->request->errDetail != ERR_DETAIL_NONE) {
-                if (al->request->errDetail > ERR_DETAIL_START  &&
-                        al->request->errDetail < ERR_DETAIL_MAX)
-                    out = errorDetailName(al->request->errDetail);
-                else {
-                    if (al->request->errDetail >= ERR_DETAIL_EXCEPTION_START)
-                        snprintf(tmp, sizeof(tmp), "%s=0x%X",
-                                 errorDetailName(al->request->errDetail), (uint32_t) al->request->errDetail);
-                    else
-                        snprintf(tmp, sizeof(tmp), "%s=%d",
-                                 errorDetailName(al->request->errDetail), al->request->errDetail);
-                    out = tmp;
+                if (al->request && al->request->errDetail != ERR_DETAIL_NONE) {
+                    if (al->request->errDetail > ERR_DETAIL_START  &&
+                            al->request->errDetail < ERR_DETAIL_MAX)
+                        out = errorDetailName(al->request->errDetail);
+                    else {
+                        if (al->request->errDetail >= ERR_DETAIL_EXCEPTION_START)
+                            snprintf(tmp, sizeof(tmp), "%s=0x%X",
+                                     errorDetailName(al->request->errDetail), (uint32_t) al->request->errDetail);
+                        else
+                            snprintf(tmp, sizeof(tmp), "%s=%d",
+                                     errorDetailName(al->request->errDetail), al->request->errDetail);
+                        out = tmp;
+                    }
                 }
-            }
             break;
 
         case LFT_SQUID_HIERARCHY:
index a1fa4dfa810a1d3322c0c255b0d43321cd4e50a2..f8d876e18729913af902f28a7b7cd3da298e251d 100644 (file)
@@ -19,7 +19,8 @@ namespace Format
 {
 
 /// One entry in a table of format tokens.
-class TokenTableEntry {
+class TokenTableEntry
+{
 public:
     /// the config file ASCII representation for this token
     /// just the base tag bytes, excluding any option syntax bytes
index cdceafab70d4e9994689295ea3efe5f64a5d66f2..7bd660699f5fb058e251ac4a837dfce383838ed9 100644 (file)
@@ -337,7 +337,7 @@ FwdState::fail(ErrorState * errorState)
         request->detailError(errorState->type, errorState->detail->errorNo());
     else
 #endif
-    request->detailError(errorState->type, errorState->xerrno);
+        request->detailError(errorState->type, errorState->xerrno);
 }
 
 /**
index cd1f684f02d867e8d11c94d2c0a1f49aa22087d0..dbdcec5ab124989faea3739ae0397087826e8302 100644 (file)
@@ -417,14 +417,14 @@ StoreEntry::deferProducer(const AsyncCall::Pointer &producer)
     if (!deferredProducer)
         deferredProducer = producer;
     else
-        debugs(20, 5, HERE << "Deferred producer call is allready set to: " << 
+        debugs(20, 5, HERE << "Deferred producer call is allready set to: " <<
                *deferredProducer << ", requested call: " << *producer);
 }
 
 void
 StoreEntry::kickProducer()
 {
-    if(deferredProducer != NULL){
+    if (deferredProducer != NULL) {
         ScheduleCallHere(deferredProducer);
         deferredProducer = NULL;
     }