------------------------------------------------------------ revno: 11773 revision-id: squidadm@squid-cache.org-20111007001229-x6gjs12wievh9vzq parent: rousskov@measurement-factory.com-20111006222528-cor6vfyn2aphaq37 committer: Automatic source maintenance branch nick: trunk timestamp: Thu 2011-10-06 18:12:29 -0600 message: SourceFormat Enforcement ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squidadm@squid-cache.org-20111007001229-\ # x6gjs12wievh9vzq # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: 8c1a1a4077e06e4f39dc5cfeb778e1c58b370642 # timestamp: 2011-10-07 00:53:28 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: rousskov@measurement-factory.com-20111006222528-\ # cor6vfyn2aphaq37 # # Begin patch === modified file 'src/DiskIO/IpcIo/IpcIoFile.cc' --- src/DiskIO/IpcIo/IpcIoFile.cc 2011-10-04 17:28:03 +0000 +++ src/DiskIO/IpcIo/IpcIoFile.cc 2011-10-07 00:12:29 +0000 @@ -710,8 +710,7 @@ 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; } === modified file 'src/adaptation/ServiceConfig.cc' --- src/adaptation/ServiceConfig.cc 2011-10-06 18:12:51 +0000 +++ src/adaptation/ServiceConfig.cc 2011-10-07 00:12:29 +0000 @@ -73,7 +73,7 @@ bool grokkedUri = false; bool onOverloadSet = false; std::set options; - + while (char *option = strtok(NULL, w_space)) { const char *name = option; const char *value = ""; @@ -99,7 +99,7 @@ // 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 @@ // 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; } === modified file 'src/client_side.cc' --- src/client_side.cc 2011-10-06 08:29:03 +0000 +++ src/client_side.cc 2011-10-07 00:12:29 +0000 @@ -3939,7 +3939,8 @@ } void -ConnStateData::expectNoForwarding() { +ConnStateData::expectNoForwarding() +{ if (bodyPipe != NULL) { debugs(33, 4, HERE << "no consumer for virgin body " << bodyPipe->status()); bodyPipe->expectNoConsumption(); === modified file 'src/fs/rock/RockSwapDir.cc' --- src/fs/rock/RockSwapDir.cc 2011-10-04 17:29:09 +0000 +++ src/fs/rock/RockSwapDir.cc 2011-10-07 00:12:29 +0000 @@ -242,7 +242,7 @@ const bool wontEvenWorkWithoutDisker = Config.workers > 1; const bool wouldWorkBetterWithDisker = DiskIOModule::Find("IpcIo"); return InDaemonMode() && (wontEvenWorkWithoutDisker || - wouldWorkBetterWithDisker); + wouldWorkBetterWithDisker); } void @@ -413,7 +413,7 @@ // 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 @@ // 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 @@ // 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; } === modified file 'src/ipc/mem/Segment.cc' --- src/ipc/mem/Segment.cc 2011-10-06 22:25:28 +0000 +++ src/ipc/mem/Segment.cc 2011-10-07 00:12:29 +0000 @@ -192,7 +192,7 @@ 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) { } === modified file 'src/ssl/certificate_db.cc' --- src/ssl/certificate_db.cc 2011-10-06 18:18:24 +0000 +++ src/ssl/certificate_db.cc 2011-10-07 00:12:29 +0000 @@ -26,11 +26,11 @@ #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::unlock() -{ +{ #if _SQUID_MSWIN_ if (hFile != INVALID_HANDLE_VALUE) { UnlockFile(hFile, 0, 0, 1, 0); @@ -90,8 +90,8 @@ 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(); === modified file 'src/ssl/certificate_db.h' --- src/ssl/certificate_db.h 2011-10-06 18:18:24 +0000 +++ src/ssl/certificate_db.h 2011-10-07 00:12:29 +0000 @@ -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 @@ 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