]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
SourceFormat Enforcement
authorAutomatic source maintenance <squidadm@squid-cache.org>
Wed, 25 Jun 2014 00:14:36 +0000 (18:14 -0600)
committerAutomatic source maintenance <squidadm@squid-cache.org>
Wed, 25 Jun 2014 00:14:36 +0000 (18:14 -0600)
include/splay.h
src/Store.h
src/fs/rock/RockSwapDir.cc
src/ipc/StoreMap.cc
src/ipc/StoreMap.h
src/store.cc
src/store_client.cc

index fc48ae12d01b5653db483aff296e400a091161ef..c9555142034a2fc13b40927b2e5731b89720238b 100644 (file)
@@ -285,7 +285,8 @@ SplayNode<V>::splay(FindValue const &dataToFind, int( * compare)(FindValue const
 template <class V>
 template <class Visitor>
 void
-SplayNode<V>::visit(Visitor &visitor) const {
+SplayNode<V>::visit(Visitor &visitor) const
+{
     if (left)
         left->visit(visitor);
     visitor(data);
@@ -296,7 +297,8 @@ SplayNode<V>::visit(Visitor &visitor) const {
 template <class V>
 template <class Visitor>
 void
-Splay<V>::visit(Visitor &visitor) const {
+Splay<V>::visit(Visitor &visitor) const
+{
     if (head)
         head->visit(visitor);
 }
index f42dc2d06970a0ccde93a4bd60d9e2d5812c4a96..f30d83a9f8e41f6252d8387d6fb5080d90636096 100644 (file)
@@ -103,7 +103,7 @@ public:
     virtual bool mayStartSwapOut();
     virtual void trimMemory(const bool preserveSwappable);
 
-    // called when a decision to cache in memory has been made    
+    // called when a decision to cache in memory has been made
     void memOutDecision(const bool willCacheInRam);
     // called when a decision to cache on disk has been made
     void swapOutDecision(const MemObject::SwapOut::Decision &decision);
index 6e65ccff05158574d5c047e6e979c2d2d29a53cc..4b81890c9c541837f9c3c63147eaca25a28ab2c0 100644 (file)
@@ -972,24 +972,24 @@ Rock::SwapDir::statfs(StoreEntry &e) const
     const int slotLimit = slotLimitActual();
     storeAppendPrintf(&e, "Maximum entries: %9d\n", entryLimit);
     if (map && entryLimit > 0) {
-            const int entryCount = map->entryCount();
-            storeAppendPrintf(&e, "Current entries: %9d %.2f%%\n",
-                              entryCount, (100.0 * entryCount / entryLimit));
+        const int entryCount = map->entryCount();
+        storeAppendPrintf(&e, "Current entries: %9d %.2f%%\n",
+                          entryCount, (100.0 * entryCount / entryLimit));
     }
 
     storeAppendPrintf(&e, "Maximum slots:   %9d\n", slotLimit);
     if (map && slotLimit > 0) {
-            const unsigned int slotsFree = !freeSlots ? 0 : freeSlots->size();
-            if (slotsFree <= static_cast<const unsigned int>(slotLimit)) {
-                const int usedSlots = slotLimit - static_cast<const int>(slotsFree);
-                storeAppendPrintf(&e, "Used slots:      %9d %.2f%%\n",
-                                  usedSlots, (100.0 * usedSlots / slotLimit));
-            }
-            if (slotLimit < 100) { // XXX: otherwise too expensive to count
-                Ipc::ReadWriteLockStats stats;
-                map->updateStats(stats);
-                stats.dump(e);
-            }
+        const unsigned int slotsFree = !freeSlots ? 0 : freeSlots->size();
+        if (slotsFree <= static_cast<const unsigned int>(slotLimit)) {
+            const int usedSlots = slotLimit - static_cast<const int>(slotsFree);
+            storeAppendPrintf(&e, "Used slots:      %9d %.2f%%\n",
+                              usedSlots, (100.0 * usedSlots / slotLimit));
+        }
+        if (slotLimit < 100) { // XXX: otherwise too expensive to count
+            Ipc::ReadWriteLockStats stats;
+            map->updateStats(stats);
+            stats.dump(e);
+        }
     }
 
     storeAppendPrintf(&e, "Pending operations: %d out of %d\n",
index f50d516f58c428f885fc398eb339641099122671..f87395931c9f8a1cb811856f106a840160ded63a 100644 (file)
@@ -416,13 +416,15 @@ Ipc::StoreMap::validSlice(const int pos) const
 }
 
 Ipc::StoreMap::Anchor&
-Ipc::StoreMap::anchorAt(const sfileno fileno) {
+Ipc::StoreMap::anchorAt(const sfileno fileno)
+{
     assert(validEntry(fileno));
     return anchors->items[fileno];
 }
 
 const Ipc::StoreMap::Anchor&
-Ipc::StoreMap::anchorAt(const sfileno fileno) const {
+Ipc::StoreMap::anchorAt(const sfileno fileno) const
+{
     return const_cast<StoreMap&>(*this).anchorAt(fileno);
 }
 
@@ -441,13 +443,15 @@ Ipc::StoreMap::anchorByKey(const cache_key *const key)
 }
 
 Ipc::StoreMap::Slice&
-Ipc::StoreMap::sliceAt(const SliceId sliceId) {
+Ipc::StoreMap::sliceAt(const SliceId sliceId)
+{
     assert(validSlice(sliceId));
     return slices->items[sliceId];
 }
 
 const Ipc::StoreMap::Slice&
-Ipc::StoreMap::sliceAt(const SliceId sliceId) const {
+Ipc::StoreMap::sliceAt(const SliceId sliceId) const
+{
     return const_cast<StoreMap&>(*this).sliceAt(sliceId);
 }
 
index c80452f210f8fb4da3efdae74f2c2ed8e453bd75..4500d1bf4a58ef704968bfb22494395a1fa763ed 100644 (file)
@@ -130,7 +130,8 @@ public:
 
 public:
     /// aggregates anchor and slice owners for Init() caller convenience
-    class Owner {
+    class Owner
+    {
     public:
         Owner();
         ~Owner();
index b8bc5477757c9a0b966a7b853f6b91586bfb691d..a52fe2ad48f978950c06279bb4fa60db5c9b505b 100644 (file)
@@ -1910,11 +1910,12 @@ StoreEntry::getSerialisedMetaData()
  * to start swapping the entry out.
  */
 void
-StoreEntry::transientsAbandonmentCheck() {
+StoreEntry::transientsAbandonmentCheck()
+{
     if (mem_obj && !mem_obj->smpCollapsed && // this worker is responsible
-        mem_obj->xitTable.index >= 0 && // other workers may be interested
-        mem_obj->memCache.index < 0 && // rejected by the shared memory cache
-        mem_obj->swapout.decision == MemObject::SwapOut::swImpossible) {
+            mem_obj->xitTable.index >= 0 && // other workers may be interested
+            mem_obj->memCache.index < 0 && // rejected by the shared memory cache
+            mem_obj->swapout.decision == MemObject::SwapOut::swImpossible) {
         debugs(20, 7, "cannot be shared: " << *this);
         if (!shutting_down) // Store::Root() is FATALly missing during shutdown
             Store::Root().transientsAbandon(*this);
@@ -1922,12 +1923,14 @@ StoreEntry::transientsAbandonmentCheck() {
 }
 
 void
-StoreEntry::memOutDecision(const bool willCacheInRam) {
+StoreEntry::memOutDecision(const bool willCacheInRam)
+{
     transientsAbandonmentCheck();
 }
 
 void
-StoreEntry::swapOutDecision(const MemObject::SwapOut::Decision &decision) {
+StoreEntry::swapOutDecision(const MemObject::SwapOut::Decision &decision)
+{
     // Abandon our transient entry if neither shared memory nor disk wants it.
     assert(mem_obj);
     mem_obj->swapout.decision = decision;
index 87e75728d5b08667503de86cbfb4e6e195082d2a..d4d2f063e36beaa68e78f3474d67583f7c8d5836 100644 (file)
@@ -434,8 +434,7 @@ store_client::scheduleDiskRead()
     if (getType() == STORE_DISK_CLIENT) {
         // we should have called startSwapin() already
         assert(swapin_sio != NULL);
-    } else
-    if (!swapin_sio && !startSwapin()) {
+    } else if (!swapin_sio && !startSwapin()) {
         debugs(90, 3, "bailing after swapin start failure for " << *entry);
         assert(!flags.store_copying);
         return;