]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
SourceFormat Enforcement
authorAutomatic source maintenance <squidadm@squid-cache.org>
Fri, 7 Oct 2011 00:12:29 +0000 (18:12 -0600)
committerAutomatic source maintenance <squidadm@squid-cache.org>
Fri, 7 Oct 2011 00:12:29 +0000 (18:12 -0600)
src/DiskIO/IpcIo/IpcIoFile.cc
src/adaptation/ServiceConfig.cc
src/client_side.cc
src/fs/rock/RockSwapDir.cc
src/ipc/mem/Segment.cc
src/ssl/certificate_db.cc
src/ssl/certificate_db.h

index aec7b40700899447e09fe1278767c142ca25f8f5..e0b3e34ee733b2ea65c8ed99841d0581b2b9dae0 100644 (file)
@@ -710,8 +710,7 @@ IpcIoFile::WaitBeforePop()
                  toSpend/1e3, 0, false);
         DiskerHandleMoreRequestsScheduled = true;
         return true;
-    } else
-    if (balance < -maxImbalance) {
+    } else if (balance < -maxImbalance) {
         // do not owe "too much" to avoid "too large" bursts of I/O
         balance = -maxImbalance;
     }
index 1d4a970e9fd32cec12b028901635a420ae46792b..b0643366853c805dc6b88dc130f3e72e0220400a 100644 (file)
@@ -73,7 +73,7 @@ Adaptation::ServiceConfig::parse()
     bool grokkedUri = false;
     bool onOverloadSet = false;
     std::set<std::string> options;
-    
+
     while (char *option = strtok(NULL, w_space)) {
         const char *name = option;
         const char *value = "";
@@ -99,7 +99,7 @@ Adaptation::ServiceConfig::parse()
 
         // Check if option is set twice
         if (options.find(name) != options.end()) {
-            debugs(3, DBG_CRITICAL, cfg_filename << ':' << config_lineno << ": " << 
+            debugs(3, DBG_CRITICAL, cfg_filename << ':' << config_lineno << ": " <<
                    "Duplicate option \"" << name << "\" in adaptation service definition");
             return false;
         }
@@ -134,7 +134,7 @@ Adaptation::ServiceConfig::parse()
 
     // is the service URI set?
     if (!grokkedUri) {
-        debugs(3, DBG_CRITICAL, cfg_filename << ':' << config_lineno << ": " << 
+        debugs(3, DBG_CRITICAL, cfg_filename << ':' << config_lineno << ": " <<
                "No \"uri\" option in adaptation service definition");
         return false;
     }
index 4c2666a4514754bc14516e94b4ec8f90370c92af..da3d5cae9f511b6e5235bd404b65b0bd11fb40eb 100644 (file)
@@ -3939,7 +3939,8 @@ ConnStateData::startClosing(const char *reason)
 }
 
 void
-ConnStateData::expectNoForwarding() {
+ConnStateData::expectNoForwarding()
+{
     if (bodyPipe != NULL) {
         debugs(33, 4, HERE << "no consumer for virgin body " << bodyPipe->status());
         bodyPipe->expectNoConsumption();
index 8924d4321c62c36ef80e2f155608e4a3fd732e8d..316c0a6fec2a36594ff893293958f39f09df620d 100644 (file)
@@ -242,7 +242,7 @@ Rock::SwapDir::needsDiskStrand() const
     const bool wontEvenWorkWithoutDisker = Config.workers > 1;
     const bool wouldWorkBetterWithDisker = DiskIOModule::Find("IpcIo");
     return InDaemonMode() && (wontEvenWorkWithoutDisker ||
-        wouldWorkBetterWithDisker);
+                              wouldWorkBetterWithDisker);
 }
 
 void
@@ -413,7 +413,7 @@ Rock::SwapDir::validateOptions()
 
     // warn if maximum db size is not reachable due to sfileno limit
     if (entryLimitAllowed() == entryLimitHigh() &&
-        diskWasteSize >= maxRoundingWaste) {
+            diskWasteSize >= maxRoundingWaste) {
         debugs(47, DBG_CRITICAL, "Rock store cache_dir[" << index << "] '" << path << "':");
         debugs(47, DBG_CRITICAL, "\tmaximum number of entries: " << entryLimitAllowed());
         debugs(47, DBG_CRITICAL, "\tmaximum object size: " << maxObjectSize() << " Bytes");
@@ -469,7 +469,7 @@ Rock::SwapDir::canStore(const StoreEntry &e, int64_t diskSpaceNeeded, int &load)
     // Do not start I/O transaction if there are less than 10% free pages left.
     // TODO: reserve page instead
     if (needsDiskStrand() &&
-        Ipc::Mem::PageLevel(Ipc::Mem::PageId::ioPage) >= 0.9 * Ipc::Mem::PageLimit(Ipc::Mem::PageId::ioPage)) {
+            Ipc::Mem::PageLevel(Ipc::Mem::PageId::ioPage) >= 0.9 * Ipc::Mem::PageLimit(Ipc::Mem::PageId::ioPage)) {
         debugs(47, 5, HERE << "too few shared pages for IPC I/O left");
         return false;
     }
@@ -563,7 +563,7 @@ Rock::SwapDir::openStoreIO(StoreEntry &e, StoreIOState::STFNCB *cbFile, StoreIOS
     // Do not start I/O transaction if there are less than 10% free pages left.
     // TODO: reserve page instead
     if (needsDiskStrand() &&
-        Ipc::Mem::PageLevel(Ipc::Mem::PageId::ioPage) >= 0.9 * Ipc::Mem::PageLimit(Ipc::Mem::PageId::ioPage)) {
+            Ipc::Mem::PageLevel(Ipc::Mem::PageId::ioPage) >= 0.9 * Ipc::Mem::PageLimit(Ipc::Mem::PageId::ioPage)) {
         debugs(47, 5, HERE << "too few shared pages for IPC I/O left");
         return NULL;
     }
index ef51693f60743f5d9cc99e6afca37eb32373b290..bb4b543f86eb04af94d48470482df8be9657c9e3 100644 (file)
@@ -192,7 +192,7 @@ typedef std::map<String, Ipc::Mem::Segment *> SegmentMap;
 static SegmentMap Segments;
 
 Ipc::Mem::Segment::Segment(const char *const id):
-    theName(id), theMem(NULL), theSize(0), theReserved(0), doUnlink(false)
+        theName(id), theMem(NULL), theSize(0), theReserved(0), doUnlink(false)
 {
 }
 
index ebfb14db4df79d8fa65b7ad5de3b007b5a8b049b..c2237f1874abbb560a57abf855ce39edb271a8f9 100644 (file)
 #define HERE "(ssl_crtd) " << __FILE__ << ':' << __LINE__ << ": "
 
 Ssl::Lock::Lock(std::string const &aFilename) :
-    filename(aFilename),
+        filename(aFilename),
 #if _SQUID_MSWIN_
-    hFile(INVALID_HANDLE_VALUE)
+        hFile(INVALID_HANDLE_VALUE)
 #else
-    fd(-1)
+        fd(-1)
 #endif
 {
 }
@@ -66,7 +66,7 @@ void Ssl::Lock::lock()
 }
 
 void Ssl::Lock::unlock()
-{ 
+{
 #if _SQUID_MSWIN_
     if (hFile != INVALID_HANDLE_VALUE) {
         UnlockFile(hFile, 0, 0, 1, 0);
@@ -90,8 +90,8 @@ Ssl::Lock::~Lock()
         unlock();
 }
 
-Ssl::Locker::Locker(Lock &aLock, const char *aFileName, int aLineNo): 
-    weLocked(false), lock(aLock), fileName(aFileName), lineNo(aLineNo)
+Ssl::Locker::Locker(Lock &aLock, const char *aFileName, int aLineNo):
+        weLocked(false), lock(aLock), fileName(aFileName), lineNo(aLineNo)
 {
     if (!lock.locked()) {
         lock.lock();
index 73ec704705f40ed3c6e918d299b1660a43d6d9ca..30352514313104e440999a20a7cf2ea1699e3582 100644 (file)
@@ -17,7 +17,8 @@
 namespace Ssl
 {
 /// maintains an exclusive blocking file-based lock
-class Lock {
+class Lock
+{
 public:
     explicit Lock(std::string const &filename); ///<  creates an unlocked lock
     ~Lock(); ///<  releases the lock if it is locked
@@ -46,7 +47,7 @@ private:
     bool weLocked; ///<  whether we locked the lock
     Lock &lock; ///<  the lock we are operating on
     const std::string fileName; ///<  where the lock was needed
-    const int lineNo; ///<  where the lock was needed    
+    const int lineNo; ///<  where the lock was needed
 };
 
 /// convenience macro to pass source code location to Locker and others