From: Henrik Nordstrom Date: Sun, 16 Mar 2008 21:48:45 +0000 (+0100) Subject: Cleanup a lot of whitespace crap, mostl of which introduced by astyle X-Git-Tag: BASIC_TPROXY4~15^2~5^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3d0ac046413f0737ff32e00fb591b67af4faaee5;p=thirdparty%2Fsquid.git Cleanup a lot of whitespace crap, mostl of which introduced by astyle --- diff --git a/include/List.h b/include/List.h index eb90355f89..2143edbd3d 100644 --- a/include/List.h +++ b/include/List.h @@ -187,9 +187,7 @@ ListContainer::push_back (C const &element) if (head) { List *tempNode = NULL; - for (tempNode = head; tempNode->next; tempNode = tempNode->next) - - ; + for (tempNode = head; tempNode->next; tempNode = tempNode->next); tempNode->next = node; } else head = node; diff --git a/src/ACLBrowser.cc b/src/ACLBrowser.cc index d682bc7414..4ce7d5ca5e 100644 --- a/src/ACLBrowser.cc +++ b/src/ACLBrowser.cc @@ -41,12 +41,8 @@ /* explicit template instantiation required for some systems */ -template class ACLStrategised - -; -template class ACLRequestHeaderStrategy - -; +template class ACLStrategised; +template class ACLRequestHeaderStrategy; ACL::Prototype ACLBrowser::RegistryProtoype(&ACLBrowser::RegistryEntry_, "browser"); diff --git a/src/ACLMaxUserIP.h b/src/ACLMaxUserIP.h index 3c518f586c..d83ec81331 100644 --- a/src/ACLMaxUserIP.h +++ b/src/ACLMaxUserIP.h @@ -75,11 +75,8 @@ private: { Flags() : strict(0){} -unsigned int strict: - 1; - } - - flags; + unsigned int strict:1; + } flags; }; MEMPROXY_CLASS_INLINE(ACLMaxUserIP) /**DOCS_NOSEMI*/ diff --git a/src/ACLMethod.cc b/src/ACLMethod.cc index d046cac055..7b1e1afc6d 100644 --- a/src/ACLMethod.cc +++ b/src/ACLMethod.cc @@ -41,9 +41,7 @@ /* explicit template instantiation required for some systems */ -template class ACLStrategised - -; +template class ACLStrategised; ACL::Prototype ACLMethod::RegistryProtoype(&ACLMethod::RegistryEntry_, "method"); diff --git a/src/ACLMethodData.cc b/src/ACLMethodData.cc index e69965e1cf..c7dae82597 100644 --- a/src/ACLMethodData.cc +++ b/src/ACLMethodData.cc @@ -88,9 +88,7 @@ ACLMethodData::parse() List **Tail; char *t = NULL; - for (Tail = &values; *Tail; Tail = &((*Tail)->next)) - - ; + for (Tail = &values; *Tail; Tail = &((*Tail)->next)); while ((t = strtokFile())) { List *q = new List (HttpRequestMethod(t, NULL)); *(Tail) = q; diff --git a/src/ACLMyPort.cc b/src/ACLMyPort.cc index 99e42a2147..87c6da0395 100644 --- a/src/ACLMyPort.cc +++ b/src/ACLMyPort.cc @@ -40,9 +40,7 @@ /* explicit template instantiation required for some systems */ -template class ACLStrategised - -; +template class ACLStrategised; ACL::Prototype ACLMyPort::RegistryProtoype(&ACLMyPort::RegistryEntry_, "myport"); diff --git a/src/ACLProtocol.cc b/src/ACLProtocol.cc index 1690fc45c5..c5e24f21d0 100644 --- a/src/ACLProtocol.cc +++ b/src/ACLProtocol.cc @@ -41,9 +41,7 @@ /* explicit template instantiation required for some systems */ -template class ACLStrategised - -; +template class ACLStrategised; ACL::Prototype ACLProtocol::RegistryProtoype(&ACLProtocol::RegistryEntry_, "proto"); @@ -53,7 +51,6 @@ int ACLProtocolStrategy::match (ACLData * &data, ACLChecklist *checklist) { return data->match (checklist->request->protocol); - ; } ACLProtocolStrategy * diff --git a/src/ACLProtocolData.cc b/src/ACLProtocolData.cc index c4293a7b37..a17ac99a4f 100644 --- a/src/ACLProtocolData.cc +++ b/src/ACLProtocolData.cc @@ -86,9 +86,7 @@ ACLProtocolData::parse() List **Tail; char *t = NULL; - for (Tail = &values; *Tail; Tail = &((*Tail)->next)) - - ; + for (Tail = &values; *Tail; Tail = &((*Tail)->next)); while ((t = strtokFile())) { List *q = new List (urlParseProtocol(t)); *(Tail) = q; diff --git a/src/ACLReferer.cc b/src/ACLReferer.cc index e56783c5e6..ad72236495 100644 --- a/src/ACLReferer.cc +++ b/src/ACLReferer.cc @@ -41,9 +41,7 @@ /* explicit template instantiation required for some systems */ -template class ACLRequestHeaderStrategy - -; +template class ACLRequestHeaderStrategy; ACL::Prototype ACLReferer::RegistryProtoype(&ACLReferer::RegistryEntry_, "referer_regex"); diff --git a/src/ACLRegexData.cc b/src/ACLRegexData.cc index 28d3021ce5..302c5d8916 100644 --- a/src/ACLRegexData.cc +++ b/src/ACLRegexData.cc @@ -125,9 +125,7 @@ aclParseRegexList(relist **curlist) int errcode; int flags = REG_EXTENDED | REG_NOSUB; - for (Tail = (relist **)curlist; *Tail; Tail = &((*Tail)->next)) - - ; + for (Tail = (relist **)curlist; *Tail; Tail = &((*Tail)->next)); while ((t = ConfigParser::strtokFile())) { if (strcmp(t, "-i") == 0) { flags |= REG_ICASE; diff --git a/src/ACLReplyMIMEType.cc b/src/ACLReplyMIMEType.cc index 7a2fecd5b8..bea60c5582 100644 --- a/src/ACLReplyMIMEType.cc +++ b/src/ACLReplyMIMEType.cc @@ -41,9 +41,7 @@ /* explicit template instantiation required for some systems */ -template class ACLReplyHeaderStrategy - -; +template class ACLReplyHeaderStrategy; ACL::Prototype ACLReplyMIMEType::RegistryProtoype(&ACLReplyMIMEType::RegistryEntry_, "rep_mime_type"); diff --git a/src/ACLRequestMIMEType.cc b/src/ACLRequestMIMEType.cc index 06befa18f7..77b336f69c 100644 --- a/src/ACLRequestMIMEType.cc +++ b/src/ACLRequestMIMEType.cc @@ -41,9 +41,7 @@ /* explicit template instantiation required for some systems */ -template class ACLRequestHeaderStrategy - -; +template class ACLRequestHeaderStrategy; ACL::Prototype ACLRequestMIMEType::RegistryProtoype(&ACLRequestMIMEType::RegistryEntry_, "req_mime_type"); diff --git a/src/ACLSslError.cc b/src/ACLSslError.cc index 1f1e23534a..1ac5caa3c5 100644 --- a/src/ACLSslError.cc +++ b/src/ACLSslError.cc @@ -10,9 +10,7 @@ /* explicit template instantiation required for some systems */ -template class ACLStrategised - -; +template class ACLStrategised; ACL::Prototype ACLSslError::RegistryProtoype(&ACLSslError::RegistryEntry_, "ssl_error"); diff --git a/src/ACLSslErrorData.cc b/src/ACLSslErrorData.cc index 0b3a2ddd4b..39a5035607 100644 --- a/src/ACLSslErrorData.cc +++ b/src/ACLSslErrorData.cc @@ -51,9 +51,7 @@ ACLSslErrorData::parse() List **Tail; char *t = NULL; - for (Tail = &values; *Tail; Tail = &((*Tail)->next)) - - ; + for (Tail = &values; *Tail; Tail = &((*Tail)->next)); while ((t = strtokFile())) { List *q = new List(sslParseErrorString(t)); *(Tail) = q; diff --git a/src/ACLStrategised.cc b/src/ACLStrategised.cc index 5d214ac2c5..b867b7cbfe 100644 --- a/src/ACLStrategised.cc +++ b/src/ACLStrategised.cc @@ -49,6 +49,4 @@ /* explicit template instantiation required for some systems */ -template class ACLStrategised - -; +template class ACLStrategised; diff --git a/src/ACLStrategy.h b/src/ACLStrategy.h index b849559bd3..573f7c513b 100644 --- a/src/ACLStrategy.h +++ b/src/ACLStrategy.h @@ -54,8 +54,7 @@ public: virtual bool valid() const {return true;} - virtual ~ACLStrategy(){}} - -; + virtual ~ACLStrategy(){} +}; #endif /* SQUID_ACLSTRATEGY_H */ diff --git a/src/ACLTimeData.cc b/src/ACLTimeData.cc index b8b853d99e..d28b6e5ad6 100644 --- a/src/ACLTimeData.cc +++ b/src/ACLTimeData.cc @@ -129,9 +129,7 @@ ACLTimeData::parse() ACLTimeData **Tail; long weekbits = 0; - for (Tail = &next; *Tail; Tail = &((*Tail)->next)) - - ; + for (Tail = &next; *Tail; Tail = &((*Tail)->next)); ACLTimeData *q = NULL; int h1, m1, h2, m2; diff --git a/src/ACLUserData.h b/src/ACLUserData.h index bf073541c3..aa9a073aa0 100644 --- a/src/ACLUserData.h +++ b/src/ACLUserData.h @@ -56,15 +56,9 @@ public: struct { - -unsigned int case_insensitive: - 1; - -unsigned int required: - 1; - } - - flags; + unsigned int case_insensitive:1; + unsigned int required:1; + } flags; }; MEMPROXY_CLASS_INLINE(ACLUserData) /**DOCS_NOSEMI*/ diff --git a/src/AccessLogEntry.h b/src/AccessLogEntry.h index f211d6de36..b77d2ffe78 100644 --- a/src/AccessLogEntry.h +++ b/src/AccessLogEntry.h @@ -93,8 +93,7 @@ public: #if USE_SSL ,ssluser(NULL) #endif - { - ; + {; } IPAddress caddr; diff --git a/src/AuthUser.cci b/src/AuthUser.cci index 23da82652d..c0ad1dd707 100644 --- a/src/AuthUser.cci +++ b/src/AuthUser.cci @@ -52,9 +52,7 @@ AuthUser::addRequest(AuthUserRequest *request) { /* lock for the request link */ - lock() - - ; + lock(); dlink_node *node = dlinkNodeNew(); dlinkAdd(request, node, &requests); diff --git a/src/AuthUser.h b/src/AuthUser.h index 82c668873f..df5a21bead 100644 --- a/src/AuthUser.h +++ b/src/AuthUser.h @@ -84,9 +84,7 @@ public: void addIp(IPAddress); _SQUID_INLINE_ void addRequest(AuthUserRequest *); - void lock() - - ; + void lock(); void unlock(); void addToNameCache(); diff --git a/src/CacheManager.h b/src/CacheManager.h index 542d01dca3..efc687c08a 100644 --- a/src/CacheManager.h +++ b/src/CacheManager.h @@ -58,15 +58,9 @@ public: struct { - -unsigned int pw_req: - 1; - -unsigned int atomic: - 1; - } - - flags; + unsigned int pw_req:1; + unsigned int atomic:1; + } flags; CacheManagerAction *next; }; diff --git a/src/DelayUser.cc b/src/DelayUser.cc index 4e6a101536..e0840500ce 100644 --- a/src/DelayUser.cc +++ b/src/DelayUser.cc @@ -186,9 +186,7 @@ DelayUserBucket::DelayUserBucket(AuthUser *aUser) : authUser (aUser) { debugs(77, 3, "DelayUserBucket::DelayUserBucket"); - authUser->lock() - - ; + authUser->lock(); } DelayUserBucket::~DelayUserBucket() diff --git a/src/DiskIO/DiskDaemon/DiskdFile.cc b/src/DiskIO/DiskDaemon/DiskdFile.cc index 22636d5591..e5e11d6cb2 100644 --- a/src/DiskIO/DiskDaemon/DiskdFile.cc +++ b/src/DiskIO/DiskDaemon/DiskdFile.cc @@ -328,8 +328,7 @@ DiskdFile::write(WriteRequest *aRequest) aRequest); if (x < 0) { - ioCompleted() - ; + ioCompleted(); errorOccured = true; debugs(79, 1, "storeDiskdSend WRITE: " << xstrerror()); // IO->shm.put (shm_offset); diff --git a/src/ESI.cc b/src/ESI.cc index 49d12d3874..145937a92b 100644 --- a/src/ESI.cc +++ b/src/ESI.cc @@ -170,18 +170,10 @@ struct esiTry : public ESIElement struct { - -int attemptok: - 1; /* the attempt branch process correctly */ - -int exceptok: - 1; /* likewise */ - -int attemptfailed: - 1; /* The attempt branch failed */ - -int exceptfailed: - 1; /* the except branch failed */ + int attemptok:1; /* the attempt branch process correctly */ + int exceptok:1; /* likewise */ + int attemptfailed:1; /* The attempt branch failed */ + int exceptfailed:1; /* the except branch failed */ } flags; @@ -264,9 +256,8 @@ struct esiOtherwise : public esiSequence { // void *operator new (size_t byteCount); // void operator delete (void *address); - esiOtherwise(esiTreeParentPtr aParent) : esiSequence (aParent) {}} - -; + esiOtherwise(esiTreeParentPtr aParent) : esiSequence (aParent) {} +}; CBDATA_CLASS_INIT(ESIContext); diff --git a/src/ESIAttempt.h b/src/ESIAttempt.h index 2f6aaf26aa..82327a36a8 100644 --- a/src/ESIAttempt.h +++ b/src/ESIAttempt.h @@ -46,9 +46,7 @@ struct esiAttempt : public esiSequence { // void *operator new (size_t byteCount); // void operator delete (void *address); - esiAttempt(esiTreeParentPtr aParent) : esiSequence (aParent) {}} - -; - + esiAttempt(esiTreeParentPtr aParent) : esiSequence (aParent) {} +}; #endif /* SQUID_ESIATTEMPT_H */ diff --git a/src/ESIContext.h b/src/ESIContext.h index 909d95b3b8..596a73177a 100644 --- a/src/ESIContext.h +++ b/src/ESIContext.h @@ -85,38 +85,22 @@ public: struct { - -int passthrough: - 1; - -int oktosend: - 1; - -int finished: - 1; + int passthrough:1; + int oktosend:1; + int finished:1; /* an error has occured, send full body replies * regardless. Note that we don't fail midstream * because we buffer until we can not fail */ + int error:1; -int error: - 1; - -int finishedtemplate: - 1; /* we've read the entire template */ - -int clientwantsdata: - 1; /* we need to satisfy a read request */ + int finishedtemplate:1; /* we've read the entire template */ + int clientwantsdata:1; /* we need to satisfy a read request */ + int kicked:1; /* note on reentering the kick routine */ + int detached:1; /* our downstream has detached */ + } flags; -int kicked: - 1; /* note on reentering the kick routine */ - -int detached: - 1; /* our downstream has detached */ - } - - flags; err_type errorpage; /* if we error what page to use */ http_status errorstatus; /* if we error, what code to return */ char *errormessage; /* error to pass to error page */ @@ -149,9 +133,7 @@ int detached: ParserState(); void freeResources(); void popAll(); - - int parsing: - 1; /* libexpat is not reentrant on the same context */ + int parsing:1; /* libexpat is not reentrant on the same context */ private: bool inited_; diff --git a/src/ESIElement.h b/src/ESIElement.h index 47cd226270..36bfbdbe5b 100644 --- a/src/ESIElement.h +++ b/src/ESIElement.h @@ -55,9 +55,8 @@ struct esiTreeParent : public RefCountable virtual void fail(ESIElement * source, char const *reason = NULL) {} - virtual ~esiTreeParent(){}} - -; + virtual ~esiTreeParent(){} +}; typedef RefCount esiTreeParentPtr; diff --git a/src/ESIExcept.h b/src/ESIExcept.h index f923425028..f4272f4529 100644 --- a/src/ESIExcept.h +++ b/src/ESIExcept.h @@ -48,8 +48,7 @@ class esiExcept : public esiSequence public: // void *operator new (size_t byteCount); // void operator delete (void *address); - esiExcept(esiTreeParentPtr aParent) : esiSequence (aParent) {}} - -; + esiExcept(esiTreeParentPtr aParent) : esiSequence (aParent) {} +}; #endif /* SQUID_ESIEXCEPT_H */ diff --git a/src/ESIInclude.h b/src/ESIInclude.h index e23d320c0a..75b0666520 100644 --- a/src/ESIInclude.h +++ b/src/ESIInclude.h @@ -81,18 +81,10 @@ public: struct { - -int onerrorcontinue: - 1; /* on error return zero data */ - -int failed: - 1; /* Failed to process completely */ - -int finished: - 1; /* Finished getting subrequest data */ - } - - flags; + int onerrorcontinue:1; /* on error return zero data */ + int failed:1; /* Failed to process completely */ + int finished:1; /* Finished getting subrequest data */ + } flags; ESIStreamContext::Pointer src; ESIStreamContext::Pointer alt; ESISegment::Pointer srccontent; diff --git a/src/ESILiteral.h b/src/ESILiteral.h index f91d141b7d..1f493e153f 100644 --- a/src/ESILiteral.h +++ b/src/ESILiteral.h @@ -59,12 +59,9 @@ struct esiLiteral : public ESIElement struct { + int donevars:1; + } flags; -int donevars: - 1; - } - - flags; ESIVarState *varState; void finish(); diff --git a/src/ESISequence.h b/src/ESISequence.h index 50e1a01480..e3150148a6 100644 --- a/src/ESISequence.h +++ b/src/ESISequence.h @@ -68,12 +68,8 @@ public: struct { - -int dovars: - 1; /* for esiVar */ - } - - flags; + int dovars:1; /* for esiVar */ + } flags; void finish(); protected: diff --git a/src/ESIVarState.h b/src/ESIVarState.h index f33fbfb3d3..00685f8ca3 100644 --- a/src/ESIVarState.h +++ b/src/ESIVarState.h @@ -88,24 +88,12 @@ private: struct { - -int language: - 1; - -int cookie: - 1; - -int host: - 1; - -int referer: - 1; - -int useragent: - 1; - } - - flags; + int language:1; + int cookie:1; + int host:1; + int referer:1; + int useragent:1; + } flags; public: diff --git a/src/EventLoop.cc b/src/EventLoop.cc index cc2af54310..e639bda062 100644 --- a/src/EventLoop.cc +++ b/src/EventLoop.cc @@ -92,9 +92,7 @@ EventLoop::run() { prepareToRun(); - while (!runOnce()) - - ; + while (!runOnce()); } bool diff --git a/src/HttpHdrContRange.h b/src/HttpHdrContRange.h index a49f6e9ce8..9ee9e00b24 100644 --- a/src/HttpHdrContRange.h +++ b/src/HttpHdrContRange.h @@ -56,7 +56,6 @@ SQUIDCEXTERN HttpHdrContRange *httpHdrContRangeDup(const HttpHdrContRange * cran SQUIDCEXTERN void httpHdrContRangePackInto(const HttpHdrContRange * crange, Packer * p); /* inits with given spec */ SQUIDCEXTERN void httpHdrContRangeSet(HttpHdrContRange *, HttpHdrRangeSpec, int64_t); -; SQUIDCEXTERN void httpHeaderAddContRange(HttpHeader *, HttpHdrRangeSpec, int64_t); diff --git a/src/HttpHeaderTools.cc b/src/HttpHeaderTools.cc index 9a79afb431..919767a229 100644 --- a/src/HttpHeaderTools.cc +++ b/src/HttpHeaderTools.cc @@ -248,7 +248,7 @@ strListGetItem(const String * str, char del, const char **item, int *ilen, const size_t len; static char delim[2][3] = { { '"', '?', 0}, - { '"', '\\', 0}}; + { '"', '\\', 0} }; int quoted = 0; assert(str && item && pos); diff --git a/src/ICMPv4.cc b/src/ICMPv4.cc index 76e538013e..221d32def1 100644 --- a/src/ICMPv4.cc +++ b/src/ICMPv4.cc @@ -65,8 +65,7 @@ const char *icmpPktStr[] = }; ICMPv4::ICMPv4() : ICMP() -{ - ; +{; } ICMPv4::~ICMPv4() diff --git a/src/MemBuf.h b/src/MemBuf.h index 3e3b0a46ba..10ab7e0dba 100644 --- a/src/MemBuf.h +++ b/src/MemBuf.h @@ -171,13 +171,11 @@ public: */ mb_size_t capacity; -unsigned stolen: - 1; /* the buffer has been stolen for use by someone else */ + unsigned stolen:1; /* the buffer has been stolen for use by someone else */ #if 0 -unsigned valid: - 1; /* to be used for debugging only! */ + unsigned valid:1; /* to be used for debugging only! */ #endif }; diff --git a/src/NullDelayId.h b/src/NullDelayId.h index 7287826788..c32114bb72 100644 --- a/src/NullDelayId.h +++ b/src/NullDelayId.h @@ -54,8 +54,7 @@ public: void operator delete (void *); virtual int bytesWanted (int minimum, int maximum) const {return max(minimum,maximum);} - virtual void bytesIn(int qty) {}} - -; + virtual void bytesIn(int qty) {} +}; #endif #endif /* NULLDELAYID_H */ diff --git a/src/PeerDigest.h b/src/PeerDigest.h index dd8b886ef8..379d185f8b 100644 --- a/src/PeerDigest.h +++ b/src/PeerDigest.h @@ -103,17 +103,10 @@ public: struct { -unsigned int needed: - 1; /* there were requests for this digest */ - -unsigned int usable: - 1; /* can be used for lookups */ - -unsigned int requested: - 1; /* in process of receiving [fresh] digest */ - } - - flags; + unsigned int needed:1; /* there were requests for this digest */ + unsigned int usable:1; /* can be used for lookups */ + unsigned int requested:1; /* in process of receiving [fresh] digest */ + } flags; struct { @@ -126,9 +119,7 @@ unsigned int requested: time_t req_delay; /* last request response time */ time_t received; /* received the current copy of a digest */ time_t disabled; /* disabled for good */ - } - - times; + } times; struct { @@ -139,12 +130,8 @@ unsigned int requested: { int msgs; kb_t kbytes; - } - - sent, recv; - } - - stats; + } sent, recv; + } stats; private: CBDATA_CLASS(PeerDigest); diff --git a/src/ProtoPort.h b/src/ProtoPort.h index 8873dbea6e..ff696cf970 100644 --- a/src/ProtoPort.h +++ b/src/ProtoPort.h @@ -21,23 +21,18 @@ struct http_port_list char *name; /* visible name */ char *defaultsite; /* default web site */ -unsigned int transparent: - 1; /* transparent proxy */ + unsigned int transparent:1; /* transparent proxy */ -unsigned int accel: - 1; /* HTTP accelerator */ + unsigned int accel:1; /* HTTP accelerator */ -unsigned int vhost: - 1; /* uses host header */ + unsigned int vhost:1; /* uses host header */ -unsigned int sslBump: - 1; /* intercepts CONNECT requests */ + unsigned int sslBump:1; /* intercepts CONNECT requests */ int vport; /* virtual port support, -1 for dynamic, >0 static*/ int disable_pmtu_discovery; #if LINUX_TPROXY -unsigned int tproxy: - 1; /* spoof client ip using tproxy */ + unsigned int tproxy:1; /* spoof client ip using tproxy */ #endif struct { diff --git a/src/StoreClient.h b/src/StoreClient.h index f202dbfa7e..3389313508 100644 --- a/src/StoreClient.h +++ b/src/StoreClient.h @@ -84,18 +84,10 @@ public: struct { - -unsigned int disk_io_pending: - 1; - -unsigned int store_copying: - 1; - -unsigned int copy_event_pending: - 1; - } - - flags; + unsigned int disk_io_pending:1; + unsigned int store_copying:1; + unsigned int copy_event_pending:1; + } flags; #if DELAY_POOLS DelayId delayId; diff --git a/src/StoreHashIndex.h b/src/StoreHashIndex.h index a17778d544..8a68148138 100644 --- a/src/StoreHashIndex.h +++ b/src/StoreHashIndex.h @@ -85,9 +85,7 @@ private: }; class StoreHashIndexEntry : public StoreEntry -{} - -; +{}; class StoreSearchHashIndex : public StoreSearch { diff --git a/src/StoreIOBuffer.h b/src/StoreIOBuffer.h index 601909497b..513e619736 100644 --- a/src/StoreIOBuffer.h +++ b/src/StoreIOBuffer.h @@ -74,12 +74,8 @@ public: struct { - -unsigned error: - 1; - } - - flags; + unsigned error:1; + } flags; size_t length; int64_t offset; char *data; diff --git a/src/StoreIOState.h b/src/StoreIOState.h index 2f5f9f1c02..ed01ce6ecb 100644 --- a/src/StoreIOState.h +++ b/src/StoreIOState.h @@ -105,9 +105,7 @@ public: struct { - -unsigned int closing: - 1; /* debugging aid */ + unsigned int closing:1; /* debugging aid */ } flags; diff --git a/src/SwapDir.h b/src/SwapDir.h index 0768372679..23af542b5c 100644 --- a/src/SwapDir.h +++ b/src/SwapDir.h @@ -172,12 +172,8 @@ public: struct Flags { Flags() : selected(0), read_only(0){} - -unsigned int selected: - 1; - -unsigned int read_only: - 1; + unsigned int selected:1; + unsigned int read_only:1; } flags; diff --git a/src/access_log.cc b/src/access_log.cc index 5382d4f5e3..4d381260fa 100644 --- a/src/access_log.cc +++ b/src/access_log.cc @@ -413,17 +413,10 @@ struct _logformat_token } data; unsigned char width; unsigned char precision; - enum log_quote quote; - -unsigned int left: - 1; - -unsigned int space: - 1; - -unsigned int zero: - 1; + unsigned int left:1; + unsigned int space:1; + unsigned int zero:1; int divisor; logformat_token *next; /* todo: move from linked list to array */ }; diff --git a/src/acl_noncore.cc b/src/acl_noncore.cc index abd6fac91c..a66ef4a7fa 100644 --- a/src/acl_noncore.cc +++ b/src/acl_noncore.cc @@ -192,9 +192,7 @@ aclParseAccessLine(ConfigParser &parser, acl_access ** head) A->cfgline = xstrdup(config_input_line); /* Append to the end of this list */ - for (B = *head, T = head; B; T = &B->next, B = B->next) - - ; + for (B = *head, T = head; B; T = &B->next, B = B->next); *T = A; /* We lock _acl_access structures in ACLChecklist::check() */ diff --git a/src/asn.cc b/src/asn.cc index a7565b38b3..ce9f739adf 100644 --- a/src/asn.cc +++ b/src/asn.cc @@ -243,9 +243,7 @@ asnCacheStart(int as) FwdState::fwdStart(-1, e, asState->request); } else { - e->lock() - - ; + e->lock(); asState->sc = storeClientListAdd(e, asState); } @@ -440,8 +438,7 @@ asnAddNet(char *as_string, int as_number) } else { debugs(53, 3, "asnAddNet: Warning: Found a network with multiple AS numbers!"); - for (Tail = &asinfo->as_number; *Tail; Tail = &(*Tail)->next) - ; + for (Tail = &asinfo->as_number; *Tail; Tail = &(*Tail)->next); q = new List (as_number); *(Tail) = q; @@ -579,9 +576,7 @@ ACLASN::parse() List *q = NULL; char *t = NULL; - for (Tail = curlist; *Tail; Tail = &((*Tail)->next)) - - ; + for (Tail = curlist; *Tail; Tail = &((*Tail)->next)); while ((t = strtokFile())) { q = new List (atoi(t)); *(Tail) = q; @@ -600,9 +595,7 @@ ACLASN::clone() const /* explicit template instantiation required for some systems */ -template class ACLStrategised - -; +template class ACLStrategised; ACL::Prototype ACLASN::SourceRegistryProtoype(&ACLASN::SourceRegistryEntry_, "src_as"); diff --git a/src/auth/digest/auth_digest.cc b/src/auth/digest/auth_digest.cc index 367109612e..f98897a35a 100644 --- a/src/auth/digest/auth_digest.cc +++ b/src/auth/digest/auth_digest.cc @@ -1392,9 +1392,7 @@ AuthDigestUserRequest::authUser(auth_user_t *aUser) assert (!authUser()); user(aUser); - user()->lock() - - ; + user()->lock(); } AuthDigestUserRequest::CredentialsState diff --git a/src/auth/digest/auth_digest.h b/src/auth/digest/auth_digest.h index 811feb11d0..48c6d80929 100644 --- a/src/auth/digest/auth_digest.h +++ b/src/auth/digest/auth_digest.h @@ -95,17 +95,10 @@ public: struct { - -unsigned int authinfo_sent: - 1; - + unsigned int authinfo_sent:1; unsigned int invalid_password:1; - -unsigned int helper_queried: - 1; - } - - flags; + unsigned int helper_queried:1; + } flags; digest_nonce_h *nonce; private: @@ -140,15 +133,9 @@ struct _digest_nonce_h : public hash_link struct { - -unsigned int valid: - 1; - -unsigned int incache: - 1; - } - - flags; + unsigned int valid:1; + unsigned int incache:1; + } flags; }; /* configuration runtime data */ diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 75a4a16263..06cd93155b 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -2023,9 +2023,7 @@ parse_hostdomain(void) l->domain = xstrdup(domain); - for (L = &(p->peer_domain); *L; L = &((*L)->next)) - - ; + for (L = &(p->peer_domain); *L; L = &((*L)->next)); *L = l; } } @@ -2057,9 +2055,7 @@ parse_hostdomaintype(void) l->type = parseNeighborType(type); l->domain = xstrdup(domain); - for (L = &(p->typelist); *L; L = &((*L)->next)) - - ; + for (L = &(p->typelist); *L; L = &((*L)->next)); *L = l; } } diff --git a/src/cache_manager.cc b/src/cache_manager.cc index d3b08a5d82..9e6450322b 100644 --- a/src/cache_manager.cc +++ b/src/cache_manager.cc @@ -104,9 +104,7 @@ CacheManager::registerAction(char const * action, char const * desc, OBJH * hand a->flags.pw_req = pw_req_flag; a->flags.atomic = atomic; - for (A = &ActionTable; *A; A = &(*A)->next) - - ; + for (A = &ActionTable; *A; A = &(*A)->next); *A = a; debugs(16, 3, "CacheManager::registerAction: registered " << action); @@ -271,9 +269,7 @@ cachemgrStart(int fd, HttpRequest * request, StoreEntry * entry) mgr->entry = entry; - entry->lock() - - ; + entry->lock(); entry->expires = squid_curtime; debugs(16, 5, "CACHEMGR: " << fd_table[fd].ipaddr << " requesting '" << mgr->action << "'"); diff --git a/src/cbdata.cc b/src/cbdata.cc index f97ac5629e..6766fe6e9c 100644 --- a/src/cbdata.cc +++ b/src/cbdata.cc @@ -158,8 +158,7 @@ cbdata::operator new(size_t size, void *where) */ void cbdata::operator delete(void *where, void *where2) -{ - ; +{; } long diff --git a/src/client_side.cc b/src/client_side.cc index 76b253b779..db8561a4b2 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -2035,9 +2035,7 @@ ConnStateData::addContextToQueue(ClientSocketContext * context) ClientSocketContext::Pointer *S; for (S = (ClientSocketContext::Pointer *) & currentobject; S->getRaw(); - S = &(*S)->next) - - ; + S = &(*S)->next); *S = context; ++nrequests; @@ -2050,9 +2048,7 @@ ConnStateData::getConcurrentRequestCount() const ClientSocketContext::Pointer *T; for (T = (ClientSocketContext::Pointer *) ¤tobject; - T->getRaw(); T = &(*T)->next, ++result) - - ; + T->getRaw(); T = &(*T)->next, ++result); return result; } @@ -2653,9 +2649,7 @@ ConnStateData::requestTimeout(const CommTimeoutCbParams &io) assert(chr == NULL); /* add to the client request queue */ - for (H = &chr; *H; H = &(*H)->next) - - ; + for (H = &chr; *H; H = &(*H)->next); *H = http; clientStreamRead(http->client_stream.tail->data, http, 0, diff --git a/src/client_side_reply.cc b/src/client_side_reply.cc index 38408bbbe5..51d118bce0 100644 --- a/src/client_side_reply.cc +++ b/src/client_side_reply.cc @@ -825,9 +825,7 @@ clientReplyContext::purgeFoundObject(StoreEntry *entry) /* Swap in the metadata */ http->storeEntry(entry); - http->storeEntry()->lock() - - ; + http->storeEntry()->lock(); http->storeEntry()->createMemObject(http->uri, http->log_uri); http->storeEntry()->mem_obj->method = http->request->method; @@ -1605,9 +1603,7 @@ clientReplyContext::doGetMoreData() /* someone found the object in the cache for us */ StoreIOBuffer tempBuffer; - http->storeEntry()->lock() - - ; + http->storeEntry()->lock(); if (http->storeEntry()->mem_obj == NULL) { /* diff --git a/src/client_side_request.cc b/src/client_side_request.cc index 8d4375f61d..f70dcaf12b 100644 --- a/src/client_side_request.cc +++ b/src/client_side_request.cc @@ -1020,9 +1020,7 @@ ClientHttpRequest::loggingEntry(StoreEntry *newEntry) loggingEntry_ = newEntry; if (loggingEntry_) - loggingEntry_->lock() - - ; + loggingEntry_->lock(); } /* diff --git a/src/client_side_request.h b/src/client_side_request.h index e7ed085016..a642a8cf8d 100644 --- a/src/client_side_request.h +++ b/src/client_side_request.h @@ -105,9 +105,8 @@ public: int64_t offset; int64_t size; size_t headers_sz; - } + } out; - out; HttpHdrRangeIter range_iter; /* data for iterating thru range specs */ size_t req_sz; /* raw request size on input, not current request size */ log_type logType; @@ -117,32 +116,19 @@ public: struct { - -unsigned int accel: - 1; - -unsigned int transparent: - 1; - -unsigned int internal: - 1; - -unsigned int done_copying: - 1; - -unsigned int purging: - 1; - } - - flags; + unsigned int accel:1; + unsigned int transparent:1; + unsigned int internal:1; + unsigned int done_copying:1; + unsigned int purging:1; + } flags; struct { http_status status; char *location; - } + } redirect; - redirect; dlink_node active; dlink_list client_stream; int mRangeCLen(); diff --git a/src/comm_select.cc b/src/comm_select.cc index 7c752dbc1e..9d778197de 100644 --- a/src/comm_select.cc +++ b/src/comm_select.cc @@ -616,9 +616,7 @@ comm_select(int msec) statCounter.select_time += (current_dtime - start); return COMM_OK; - } while (timeout > current_dtime) - - ; + } while (timeout > current_dtime); debugs(5, 8, "comm_select: time out: " << squid_curtime); return COMM_TIMEOUT; diff --git a/src/comm_select_win32.cc b/src/comm_select_win32.cc index 4806c12dc5..a09ea5e160 100644 --- a/src/comm_select_win32.cc +++ b/src/comm_select_win32.cc @@ -638,9 +638,7 @@ comm_select(int msec) statCounter.select_time += (current_dtime - start); return COMM_OK; - } while (timeout > current_dtime) - - ; + } while (timeout > current_dtime); debugs(5, 8, "comm_select: time out: " << squid_curtime); return COMM_TIMEOUT; diff --git a/src/debug.cc b/src/debug.cc index cfe2ebc63a..43707a4293 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -223,9 +223,7 @@ debugArg(const char *arg) { } else { s = atoi(arg); - while (*arg && *arg++ != ',') - - ; + while (*arg && *arg++ != ','); } l = atoi(arg); diff --git a/src/errorpage.h b/src/errorpage.h index 118b23def2..04a541aeb3 100644 --- a/src/errorpage.h +++ b/src/errorpage.h @@ -104,21 +104,16 @@ public: struct { - -unsigned int flag_cbdata: - 1; - } - - flags; + unsigned int flag_cbdata:1; + } flags; struct { wordlist *server_msg; char *request; char *reply; - } + } ftp; - ftp; char *request_hdrs; char *err_msg; /* Preformatted error message from the cache */ diff --git a/src/forward.cc b/src/forward.cc index 48e060311b..d8e47225d9 100644 --- a/src/forward.cc +++ b/src/forward.cc @@ -100,9 +100,7 @@ FwdState::FwdState(int fd, StoreEntry * e, HttpRequest * r) request = HTTPMSGLOCK(r); start_t = squid_curtime; - e->lock() - - ; + e->lock(); EBIT_SET(e->flags, ENTRY_FWD_HDR_WAIT); } @@ -519,9 +517,7 @@ FwdState::retryOrBail() { FwdServer **T, *T2 = NULL; servers = fs->next; - for (T = &servers; *T; T2 = *T, T = &(*T)->next) - - ; + for (T = &servers; *T; T2 = *T, T = &(*T)->next); if (T2 && T2->_peer) { /* cycle */ *T = fs; diff --git a/src/forward.h b/src/forward.h index 90e46956d9..40dbcecf8a 100644 --- a/src/forward.h +++ b/src/forward.h @@ -95,14 +95,9 @@ private: struct { - -unsigned int dont_retry: - 1; - -unsigned int ftp_pasv_failed: - 1; - -unsigned int forward_completed:1; + unsigned int dont_retry:1; + unsigned int ftp_pasv_failed:1; + unsigned int forward_completed:1; } flags; diff --git a/src/fqdncache.cc b/src/fqdncache.cc index 5e0b9356d5..58c391436e 100644 --- a/src/fqdncache.cc +++ b/src/fqdncache.cc @@ -110,12 +110,8 @@ struct _fqdncache_entry struct { - -unsigned int negcached: - 1; - -unsigned int fromhosts: - 1; + unsigned int negcached:1; + unsigned int fromhosts:1; } flags; @@ -505,7 +501,6 @@ fqdncacheHandleReply(void *data, rfc1035_rr * answers, int na, const char *error #if USE_DNSSERVERS fqdncacheParse(f, reply); - ; #else fqdncacheParse(f, answers, na, error_message); diff --git a/src/fs/coss/store_coss.h b/src/fs/coss/store_coss.h index 20bacd5e8d..3c1103853b 100644 --- a/src/fs/coss/store_coss.h +++ b/src/fs/coss/store_coss.h @@ -74,15 +74,9 @@ public: struct { - -unsigned int reading: - 1; - -unsigned int writing: - 1; - } - - flags; + unsigned int reading:1; + unsigned int writing:1; + } flags; CossMemBuf *locked_membuf; off_t st_size; diff --git a/src/fs/coss/store_dir_coss.cc b/src/fs/coss/store_dir_coss.cc index 43d17627e8..0a966a3b0c 100644 --- a/src/fs/coss/store_dir_coss.cc +++ b/src/fs/coss/store_dir_coss.cc @@ -67,12 +67,8 @@ struct _RebuildState struct { - -unsigned int clean: - 1; - } - - flags; + unsigned int clean:1; + } flags; struct _store_rebuild_data counts; }; @@ -111,9 +107,7 @@ storeCossDirSwapLogFile(SwapDir * sd, const char *ext) while (strlen(pathtmp) && pathtmp[strlen(pathtmp) - 1] == '.') pathtmp[strlen(pathtmp) - 1] = '\0'; - for (pathtmp2 = pathtmp; *pathtmp2 == '.'; pathtmp2++) - - ; + for (pathtmp2 = pathtmp; *pathtmp2 == '.'; pathtmp2++); snprintf(path, SQUID_MAXPATHLEN - 64, Config.Log.swap, pathtmp2); if (strncmp(path, Config.Log.swap, SQUID_MAXPATHLEN - 64) == 0) { diff --git a/src/fs/ufs/store_dir_ufs.cc b/src/fs/ufs/store_dir_ufs.cc index ed2c4389e3..913ddff465 100644 --- a/src/fs/ufs/store_dir_ufs.cc +++ b/src/fs/ufs/store_dir_ufs.cc @@ -602,9 +602,7 @@ UFSSwapDir::logFile(char const *ext) const while (strlen(pathtmp) && pathtmp[strlen(pathtmp) - 1] == '.') pathtmp[strlen(pathtmp) - 1] = '\0'; - for (pathtmp2 = pathtmp; *pathtmp2 == '.'; pathtmp2++) - - ; + for (pathtmp2 = pathtmp; *pathtmp2 == '.'; pathtmp2++); snprintf(lpath, SQUID_MAXPATHLEN - 64, Config.Log.swap, pathtmp2); if (strncmp(lpath, Config.Log.swap, SQUID_MAXPATHLEN - 64) == 0) { diff --git a/src/fs/ufs/ufscommon.h b/src/fs/ufs/ufscommon.h index 0867a33a18..0d1b96d227 100644 --- a/src/fs/ufs/ufscommon.h +++ b/src/fs/ufs/ufscommon.h @@ -398,18 +398,10 @@ public: struct { - -unsigned int need_to_validate: - 1; - -unsigned int clean: - 1; - -unsigned int init: - 1; - } - - flags; + unsigned int need_to_validate:1; + unsigned int clean:1; + unsigned int init:1; + } flags; int in_dir; int done; int fn; diff --git a/src/ftp.cc b/src/ftp.cc index e4f3d2ad8a..db7c9b9635 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -1021,9 +1021,7 @@ FtpStateData::htmlifyListEntry(const char *line) const char *p; snprintf(html, 8192, "%s\n", line); - for (p = line; *p && xisspace(*p); p++) - - ; + for (p = line; *p && xisspace(*p); p++); if (*p && !xisspace(*p)) flags.listformat_unknown = 1; @@ -1866,9 +1864,7 @@ FtpStateData::handleControlReply() } /* Move the last line of the reply message to ctrl.last_reply */ - for (W = &ctrl.message; (*W)->next; W = &(*W)->next) - - ; + for (W = &ctrl.message; (*W)->next; W = &(*W)->next); safe_free(ctrl.last_reply); ctrl.last_reply = xstrdup((*W)->key); diff --git a/src/gopher.cc b/src/gopher.cc index bfa51d3e54..9fdd3995be 100644 --- a/src/gopher.cc +++ b/src/gopher.cc @@ -1013,9 +1013,7 @@ gopherStart(FwdState * fwd) gopherState = cbdataAlloc(GopherStateData); gopherState->buf = (char *)memAllocate(MEM_4K_BUF); - entry->lock() - - ; + entry->lock(); gopherState->entry = entry; gopherState->fwd = fwd; diff --git a/src/helper.h b/src/helper.h index 0e7f542703..75e2f4842b 100644 --- a/src/helper.h +++ b/src/helper.h @@ -133,26 +133,16 @@ struct _helper_server struct _helper_flags { - -unsigned int writing: - 1; - -unsigned int closing: - 1; - -unsigned int shutdown: - 1; - } - - flags; + unsigned int writing:1; + unsigned int closing:1; + unsigned int shutdown:1; + } flags; struct { int uses; unsigned int pending; - } - - stats; + } stats; void *hIpc; }; @@ -183,19 +173,11 @@ struct _helper_stateful_server struct _helper_stateful_flags { - -unsigned int busy: - 1; - -unsigned int closing: - 1; - -unsigned int shutdown: - 1; + unsigned int busy:1; + unsigned int closing:1; + unsigned int shutdown:1; stateful_helper_reserve_t reserved; - } - - flags; + } flags; struct { @@ -204,9 +186,7 @@ unsigned int shutdown: int releases; int deferbyfunc; int deferbycb; - } - - stats; + } stats; int deferred_requests; /* current number of deferred requests */ void *data; /* State data used by the calling routines */ void *hIpc; diff --git a/src/htcp.cc b/src/htcp.cc index 83a2d4baf2..c989abd0bc 100644 --- a/src/htcp.cc +++ b/src/htcp.cc @@ -75,41 +75,23 @@ struct _htcpHeader struct _htcpDataHeaderSquid { u_int16_t length; -#if !WORDS_BIGENDIAN - -unsigned int opcode: - 4; -unsigned int response: - 4; +#if !WORDS_BIGENDIAN + unsigned int opcode:4; + unsigned int response:4; #else - -unsigned int response: - 4; - -unsigned int opcode: - 4; + unsigned int response:4; + unsigned int opcode:4; #endif -#if !WORDS_BIGENDIAN -unsigned int reserved: - 6; - -unsigned int F1: - 1; - -unsigned int RR: - 1; +#if !WORDS_BIGENDIAN + unsigned int reserved:6; + unsigned int F1:1; + unsigned int RR:1; #else - -unsigned int RR: - 1; - -unsigned int F1: - 1; - -unsigned int reserved: - 6; + unsigned int RR:1; + unsigned int F1:1; + unsigned int reserved:6; #endif u_int32_t msg_id; @@ -118,41 +100,23 @@ unsigned int reserved: struct _htcpDataHeader { u_int16_t length; -#if WORDS_BIGENDIAN - -u_int8_t opcode: - 4; -u_int8_t response: - 4; +#if WORDS_BIGENDIAN + u_int8_t opcode:4; + u_int8_t response:4; #else - -u_int8_t response: - 4; - -u_int8_t opcode: - 4; + u_int8_t response:4; + u_int8_t opcode:4; #endif -#if WORDS_BIGENDIAN -u_int8_t reserved: - 6; - -u_int8_t F1: - 1; - -u_int8_t RR: - 1; +#if WORDS_BIGENDIAN + u_int8_t reserved:6; + u_int8_t F1:1; + u_int8_t RR:1; #else - -u_int8_t RR: - 1; - -u_int8_t F1: - 1; - -u_int8_t reserved: - 6; + u_int8_t RR:1; + u_int8_t F1:1; + u_int8_t reserved:6; #endif u_int32_t msg_id; diff --git a/src/ident.cc b/src/ident.cc index ece329c276..ac7f1b52d6 100644 --- a/src/ident.cc +++ b/src/ident.cc @@ -179,9 +179,7 @@ identReadReply(int fd, char *buf, size_t len, comm_err_t flag, int xerrno, void if (strstr(buf, "USERID")) { if ((ident = strrchr(buf, ':'))) { - while (xisspace(*++ident)) - - ; + while (xisspace(*++ident)); identCallback(state, ident); } } @@ -198,9 +196,7 @@ identClientAdd(IdentStateData * state, IDCB * callback, void *callback_data) c->callback = callback; c->callback_data = cbdataReference(callback_data); - for (C = &state->clients; *C; C = &(*C)->next) - - ; + for (C = &state->clients; *C; C = &(*C)->next); *C = c; } diff --git a/src/ipcache.cc b/src/ipcache.cc index 4ac7ebced1..fc56b985ba 100644 --- a/src/ipcache.cc +++ b/src/ipcache.cc @@ -110,12 +110,8 @@ struct _ipcache_entry struct { - -unsigned int negcached: - 1; - -unsigned int fromhosts: - 1; + unsigned int negcached:1; + unsigned int fromhosts:1; } flags; diff --git a/src/mem_node.h b/src/mem_node.h index dd138efcef..d596f3573b 100644 --- a/src/mem_node.h +++ b/src/mem_node.h @@ -58,9 +58,7 @@ public: StoreIOBuffer nodeBuffer; /* Private */ char data[SM_PAGE_SIZE]; - -unsigned int write_pending: - 1; + unsigned int write_pending:1; }; MEMPROXY_CLASS_INLINE(mem_node) /**DOCS_NOSEMI*/ diff --git a/src/mime.cc b/src/mime.cc index d528b670d1..892cae5e12 100644 --- a/src/mime.cc +++ b/src/mime.cc @@ -74,11 +74,9 @@ public: char *content_encoding; char transfer_mode; -unsigned int view_option: - 1; + unsigned int view_option:1; + unsigned int download_option:1; -unsigned int download_option: - 1; mimeEntry *next; MimeIcon theIcon; }; diff --git a/src/peer_digest.cc b/src/peer_digest.cc index ee7190a4b2..2a0d23578b 100644 --- a/src/peer_digest.cc +++ b/src/peer_digest.cc @@ -376,9 +376,7 @@ peerDigestRequest(PeerDigest * pd) if (old_e) { debugs(72, 5, "peerDigestRequest: found old entry"); - old_e->lock() - - ; + old_e->lock(); old_e->createMemObject(url, url); fetch->old_sc = storeClientListAdd(old_e, fetch); diff --git a/src/repl/heap/store_repl_heap.cc b/src/repl/heap/store_repl_heap.cc index 596dd10938..81e48ab493 100644 --- a/src/repl/heap/store_repl_heap.cc +++ b/src/repl/heap/store_repl_heap.cc @@ -234,9 +234,7 @@ try_again: if (entry->locked()) { - entry->lock() - - ; + entry->lock(); linklistPush(&heap_walker->locked_entries, entry); goto try_again; diff --git a/src/stat.cc b/src/stat.cc index c1277e2968..8cdca74f73 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -379,9 +379,7 @@ statObjectsStart(StoreEntry * sentry, STOBJFLT * filter) state->sentry = sentry; state->filter = filter; - sentry->lock() - - ; + sentry->lock(); state->theSearch = Store::Root().search(NULL, NULL); eventAdd("statObjects", statObjects, state, 0.0, 1); diff --git a/src/store_client.cc b/src/store_client.cc index ccfa95c71c..04759ed2fd 100644 --- a/src/store_client.cc +++ b/src/store_client.cc @@ -585,8 +585,7 @@ store_client::readHeader(char const *buf, ssize_t len) /* * we have (part of) what they want */ - size_t copy_sz = XMIN(copyInto.length, body_sz) - ; + size_t copy_sz = XMIN(copyInto.length, body_sz); debugs(90, 3, "storeClientReadHeader: copying " << copy_sz << " bytes of body"); xmemmove(copyInto.data, copyInto.data + mem->swap_hdr_sz, copy_sz); diff --git a/src/store_swapout.cc b/src/store_swapout.cc index 75ccf07693..cc596dd356 100644 --- a/src/store_swapout.cc +++ b/src/store_swapout.cc @@ -78,9 +78,7 @@ storeSwapOutStart(StoreEntry * e) /* Don't lock until after create, or the replacement * code might get confused */ - e->lock() - - ; + e->lock(); /* Pick up the file number if it was assigned immediately */ e->swap_filen = mem->swapout.sio->swap_filen; diff --git a/src/structs.h b/src/structs.h index b4ad30392f..ba12390e22 100644 --- a/src/structs.h +++ b/src/structs.h @@ -151,9 +151,7 @@ struct _SquidConfig */ int highWaterMark; int lowWaterMark; - } - - Swap; + } Swap; size_t memMaxSize; struct @@ -161,9 +159,7 @@ struct _SquidConfig int64_t min; int pct; int64_t max; - } - - quickAbort; + } quickAbort; int64_t readAheadGap; RemovalPolicySettings *replPolicy; RemovalPolicySettings *memPolicy; @@ -199,9 +195,7 @@ struct _SquidConfig time_t idns_query; #endif - } - - Timeout; + } Timeout; size_t maxRequestHeaderSize; int64_t maxRequestBodySize; size_t maxReplyHeaderSize; @@ -218,10 +212,7 @@ struct _SquidConfig u_short snmp; #endif - - } - - Port; + } Port; struct { @@ -231,18 +222,14 @@ struct _SquidConfig https_port_list *https; #endif - } - - Sockaddr; + } Sockaddr; #if SQUID_SNMP struct { char *configFile; char *agentInfo; - } - - Snmp; + } Snmp; #endif #if USE_WCCP @@ -253,9 +240,7 @@ struct _SquidConfig IPAddress address; int version; - } - - Wccp; + } Wccp; #endif #if USE_WCCPv2 @@ -841,41 +826,18 @@ public: struct _http_state_flags { - -unsigned int proxying: - 1; - -unsigned int keepalive: - 1; - -unsigned int only_if_cached: - 1; - -unsigned int headers_parsed: - 1; - -unsigned int front_end_https: - 2; - -unsigned int originpeer: - 1; - -unsigned int keepalive_broken: - 1; - -unsigned int abuse_detected: - 1; - -unsigned int request_sent: - 1; - -unsigned int do_next_read: - 1; - -unsigned int consume_body_data: - 1; - -unsigned int chunked:1; + unsigned int proxying:1; + unsigned int keepalive:1; + unsigned int only_if_cached:1; + unsigned int headers_parsed:1; + unsigned int front_end_https:2; + unsigned int originpeer:1; + unsigned int keepalive_broken:1; + unsigned int abuse_detected:1; + unsigned int request_sent:1; + unsigned int do_next_read:1; + unsigned int consume_body_data:1; + unsigned int chunked:1; }; struct _ipcache_addrs @@ -973,63 +935,30 @@ struct _peer struct { - -unsigned int proxy_only: - 1; - -unsigned int no_query: - 1; - -unsigned int background_ping: - 1; - -unsigned int no_digest: - 1; - -unsigned int default_parent: - 1; - -unsigned int roundrobin: - 1; - -unsigned int weighted_roundrobin: - 1; - -unsigned int mcast_responder: - 1; - -unsigned int closest_only: - 1; + unsigned int proxy_only:1; + unsigned int no_query:1; + unsigned int background_ping:1; + unsigned int no_digest:1; + unsigned int default_parent:1; + unsigned int roundrobin:1; + unsigned int weighted_roundrobin:1; + unsigned int mcast_responder:1; + unsigned int closest_only:1; #if USE_HTCP - -unsigned int htcp: - 1; - -unsigned int htcp_oldsquid: - 1; + unsigned int htcp:1; + unsigned int htcp_oldsquid:1; #endif - -unsigned int no_netdb_exchange: - 1; + unsigned int no_netdb_exchange:1; #if DELAY_POOLS - -unsigned int no_delay: - 1; + unsigned int no_delay:1; #endif - -unsigned int allow_miss: - 1; + unsigned int allow_miss:1; #if USE_CARP - -unsigned int carp: - 1; + unsigned int carp:1; #endif + unsigned int originserver:1; + } options; -unsigned int originserver: - 1; - } - - options; int weight; int basetime; @@ -1043,18 +972,10 @@ unsigned int originserver: struct { - -unsigned int count_event_pending: - 1; - -unsigned int counting: - 1; - } - - flags; - } - - mcast; + unsigned int count_event_pending:1; + unsigned int counting:1; + } flags; + } mcast; #if USE_CACHE_DIGESTS PeerDigest *digest; @@ -1164,68 +1085,31 @@ struct request_flags #if LINUX_TPROXY tproxy = 0; #endif - } -unsigned int range: - 1; - -unsigned int nocache: - 1; - -unsigned int ims: - 1; - -unsigned int auth: - 1; - -unsigned int cachable: - 1; - -unsigned int hierarchical: - 1; - -unsigned int loopdetect: - 1; - -unsigned int proxy_keepalive: - 1; - -unsigned int proxying: - 1; /* this should be killed, also in httpstateflags */ - -unsigned int refresh: - 1; - -unsigned int redirected: - 1; - -unsigned int need_validation: - 1; + unsigned int range:1; + unsigned int nocache:1; + unsigned int ims:1; + unsigned int auth:1; + unsigned int cachable:1; + unsigned int hierarchical:1; + unsigned int loopdetect:1; + unsigned int proxy_keepalive:1; + unsigned int proxying:1; /* this should be killed, also in httpstateflags */ + unsigned int refresh:1; + unsigned int redirected:1; + unsigned int need_validation:1; #if HTTP_VIOLATIONS - -unsigned int nocache_hack: - 1; /* for changing/ignoring no-cache requests */ + unsigned int nocache_hack:1; /* for changing/ignoring no-cache requests */ #endif - -unsigned int accelerated: - 1; - -unsigned int transparent: - 1; - + unsigned int accelerated:1; + unsigned int transparent:1; #if LINUX_TPROXY -unsigned int tproxy: - 1; /* spoof client ip using tproxy */ + unsigned int tproxy:1; /* spoof client ip using tproxy */ #endif -unsigned int internal: - 1; - -unsigned int internalclient: - 1; - -unsigned int must_keepalive: - 1; + unsigned int internal:1; + unsigned int internalclient:1; + unsigned int must_keepalive:1; // When adding new flags, please update cloneAdaptationImmune() as needed. @@ -1241,11 +1125,8 @@ unsigned int must_keepalive: private: -unsigned int reset_tcp: - 1; - -unsigned int destinationIPLookedUp_: - 1; + unsigned int reset_tcp:1; + unsigned int destinationIPLookedUp_:1; }; struct _link_list @@ -1273,42 +1154,19 @@ struct _refresh_t struct { - -unsigned int icase: - 1; - -unsigned int refresh_ims: - 1; + unsigned int icase:1; + unsigned int refresh_ims:1; #if HTTP_VIOLATIONS - -unsigned int override_expire: - 1; - -unsigned int override_lastmod: - 1; - -unsigned int reload_into_ims: - 1; - -unsigned int ignore_reload: - 1; - -unsigned int ignore_no_cache: - 1; - -unsigned int ignore_no_store: - 1; - -unsigned int ignore_private: - 1; - -unsigned int ignore_auth: - 1; + unsigned int override_expire:1; + unsigned int override_lastmod:1; + unsigned int reload_into_ims:1; + unsigned int ignore_reload:1; + unsigned int ignore_no_cache:1; + unsigned int ignore_no_store:1; + unsigned int ignore_private:1; + unsigned int ignore_auth:1; #endif - - } - - flags; + } flags; }; /* @@ -1351,9 +1209,7 @@ struct _StatCounters StatHist nh_svc_time; StatHist hit_svc_time; StatHist all_svc_time; - } - - client_http; + } client_http; struct { @@ -1364,12 +1220,8 @@ struct _StatCounters int errors; kb_t kbytes_in; kb_t kbytes_out; - } - - all , http, ftp, other; - } - - server; + } all , http, ftp, other; + } server; struct { @@ -1401,23 +1253,17 @@ struct _StatCounters { int pkts_sent; int pkts_recv; - } - - htcp; + } htcp; struct { int requests; - } - - unlink; + } unlink; struct { StatHist svc_time; - } - - dns; + } dns; struct { @@ -1433,16 +1279,12 @@ struct _StatCounters #endif StatHist on_xition_count; - } - - cd; + } cd; struct { int times_used; - } - - netdb; + } netdb; int page_faults; int select_loops; int select_fds; @@ -1457,7 +1299,6 @@ struct _StatCounters struct { - struct { int opens; @@ -1466,9 +1307,7 @@ struct _StatCounters int writes; int seeks; int unlinks; - } - - disk; + } disk; struct { @@ -1481,13 +1320,9 @@ struct _StatCounters int writes; int recvfroms; int sendtos; - } - - sock; + } sock; int selects; - } - - syscalls; + } syscalls; int aborted_requests; struct @@ -1495,9 +1330,7 @@ struct _StatCounters int files_cleaned; int outs; int ins; - } - - swap; + } swap; }; /* per header statistics */ @@ -1533,18 +1366,14 @@ struct _ClientInfo kb_t kbytes_in; kb_t kbytes_out; kb_t hit_kbytes_out; - } - - Http, Icp; + } Http, Icp; struct { time_t time; int n_req; int n_denied; - } - - cutoff; + } cutoff; int n_established; /* number of current established connections */ time_t last_seen; }; @@ -1587,9 +1416,7 @@ struct _Logfile { unsigned int fatal; unsigned int syslog; - } - - flags; + } flags; int syslog_priority; }; diff --git a/src/tests/testAuth.cc b/src/tests/testAuth.cc index a9d3659e8e..195e54ce5e 100644 --- a/src/tests/testAuth.cc +++ b/src/tests/testAuth.cc @@ -118,7 +118,8 @@ fake_auth_setup() params[]={ {"digest", digest_parms, 2}, {"basic", basic_parms, 2}, {"ntlm", ntlm_parms, 1}, - {"negotiate", negotiate_parms, 1}}; + {"negotiate", negotiate_parms, 1} + }; for (unsigned scheme=0; scheme < 4; scheme++) setup_scheme(getConfig(params[scheme].name), params[scheme].params, params[scheme].paramlength); diff --git a/src/tests/testEvent.cc b/src/tests/testEvent.cc index b7c5a191f9..5fe93bb072 100644 --- a/src/tests/testEvent.cc +++ b/src/tests/testEvent.cc @@ -80,8 +80,7 @@ testEvent::testDump() "\n" "Operation \tNext Execution \tWeight\tCallback Valid?\n" "test event \t0.000 sec\t 0\t N/A\n" - "test event2 \t0.000 sec\t 0\t N/A\n" - ; + "test event2 \t0.000 sec\t 0\t N/A\n"; scheduler.schedule("last event", CalledEvent::Handler, &event, 0, 0, false); diff --git a/src/tools.cc b/src/tools.cc index d7ce3296e0..81b6e74fb9 100644 --- a/src/tools.cc +++ b/src/tools.cc @@ -582,9 +582,7 @@ sig_child(int sig) { } - while (pid > 0 || (pid < 0 && errno == EINTR)) - - ; + while (pid > 0 || (pid < 0 && errno == EINTR)); signal(sig, sig_child); #endif diff --git a/src/urn.cc b/src/urn.cc index 5378178bd7..218d4933e2 100644 --- a/src/urn.cc +++ b/src/urn.cc @@ -70,12 +70,8 @@ public: struct { - -unsigned int force_menu: - 1; - } - - flags; + unsigned int force_menu:1; + } flags; char reqbuf[URN_REQBUF_SZ]; int reqofs; @@ -249,9 +245,7 @@ UrnState::start(HttpRequest * r, StoreEntry * e) entry = e; request = HTTPMSGLOCK(r); - entry->lock() - - ; + entry->lock(); setUriResFromRequest(r); if (urlres_r == NULL) @@ -271,9 +265,7 @@ UrnState::created(StoreEntry *newEntry) FwdState::fwdStart(-1, urlres_e, urlres_r); } else { - urlres_e->lock() - - ; + urlres_e->lock(); sc = storeClientListAdd(urlres_e, this); } diff --git a/src/wccp2.cc b/src/wccp2.cc index f50b87340b..c752b018a4 100644 --- a/src/wccp2.cc +++ b/src/wccp2.cc @@ -442,7 +442,6 @@ struct wccp2_service_list_t uint32_t change_num; char *wccp2_identity_info_ptr; - ; struct wccp2_security_md5_t *security_info; diff --git a/src/whois.cc b/src/whois.cc index 5af81a502d..9bbd8ca165 100644 --- a/src/whois.cc +++ b/src/whois.cc @@ -91,9 +91,7 @@ whoisStart(FwdState * fwd) p->fwd = fwd; p->dataWritten = false; - p->entry->lock() - - ; + p->entry->lock(); comm_add_close_handler(fd, whoisClose, p); l = p->request->urlpath.size() + 3; diff --git a/tools/cachemgr.cc b/tools/cachemgr.cc index 966e401f10..1704194b95 100644 --- a/tools/cachemgr.cc +++ b/tools/cachemgr.cc @@ -435,9 +435,7 @@ parse_status_line(const char *sline, const char **statusStr) if (strncasecmp(sline, "HTTP/", 5) || !sp) return -1; - while (xisspace(*++sp)) - - ; + while (xisspace(*++sp)); if (!xisdigit(*sp)) return -1;