From: Automatic source maintenance Date: Sun, 17 Jun 2012 01:19:07 +0000 (-0600) Subject: SourceFormat Enforcement X-Git-Tag: BumpSslServerFirst.take09~3^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c0f81932e3f80dd3e81c15d8cb81e516872d0a31;p=thirdparty%2Fsquid.git SourceFormat Enforcement --- diff --git a/src/acl/Acl.cc b/src/acl/Acl.cc index 3172e7ac44..36d7db7d88 100644 --- a/src/acl/Acl.cc +++ b/src/acl/Acl.cc @@ -323,7 +323,7 @@ ACLList::matches (ACLChecklist *checklist) const { assert (_acl); // XXX: AclMatchedName does not contain a matched ACL name when the acl - // does not match (or contains stale name if no ACLs are checked). In + // does not match (or contains stale name if no ACLs are checked). In // either case, we get misleading debugging and possibly incorrect error // messages. Unfortunately, deny_info's "when none http_access // lines match" exception essentially requires this mess. diff --git a/src/acl/Checklist.cc b/src/acl/Checklist.cc index f1a45be517..fe6997d3fb 100644 --- a/src/acl/Checklist.cc +++ b/src/acl/Checklist.cc @@ -218,7 +218,7 @@ ACLChecklist::matchNodes(const ACLList * head, bool const fast) if (resultBeforeAsync == nmrMatch) continue; - + if (resultBeforeAsync == nmrMismatch || resultBeforeAsync == nmrFinished) return false; @@ -236,7 +236,7 @@ ACLChecklist::matchNodes(const ACLList * head, bool const fast) // This is inefficient and ugly, but fixing all match() code, including // the code it calls, such as ipcache_nbgethostbyname(), takes time. if (!asyncInProgress()) { // failed to start an async operation - + if (finished()) { debugs(28, 3, HERE << this << " finished after failing to go async: " << currentAnswer()); return false; // an exceptional case @@ -294,7 +294,7 @@ ACLChecklist::matchNode(const ACLList &node, bool const fast) assert(!needsAsync); debugs(28, 3, HERE << this << " exception: " << currentAnswer()); return nmrFinished; - } + } if (!needsAsync) { debugs(28, 3, HERE << this << " simple mismatch"); @@ -395,8 +395,7 @@ ACLChecklist::fastCheck(const ACLList * list) // assume DENY/ALLOW on mis/matches due to not having acl_access object if (matchAclList(list, true)) markFinished(ACCESS_ALLOWED, "all ACLs matched"); - else - if (!finished()) + else if (!finished()) markFinished(ACCESS_DENIED, "ACL mismatched"); PROF_stop(aclCheckFast); return currentAnswer(); @@ -442,7 +441,7 @@ ACLChecklist::fastCheck() } /// When no rules matched, the answer is the inversion of the last seen rule -/// action (or ACCESS_DUNNO if the reversal is not possible). The caller +/// action (or ACCESS_DUNNO if the reversal is not possible). The caller /// should set lastSeenAction to ACCESS_DUNNO if there were no rules to see. void ACLChecklist::calcImplicitAnswer(const allow_t &lastSeenAction) diff --git a/src/acl/Checklist.h b/src/acl/Checklist.h index e7e4c5e382..51a2d4ae9a 100644 --- a/src/acl/Checklist.h +++ b/src/acl/Checklist.h @@ -205,7 +205,7 @@ public: private: /* internal methods */ /// possible outcomes when trying to match a single ACL node in a list typedef enum { nmrMatch, nmrMismatch, nmrFinished, nmrNeedsAsync } - NodeMatchingResult; + NodeMatchingResult; /// prepare for checking ACLs; called once per check void preCheck(const char *what); diff --git a/src/external_acl.cc b/src/external_acl.cc index fd160d9566..3c51377ca4 100644 --- a/src/external_acl.cc +++ b/src/external_acl.cc @@ -1398,7 +1398,7 @@ void ExternalACLLookup::Start(ACLChecklist *checklist, external_acl_data *acl, bool inBackground) { external_acl *def = acl->def; - + ACLFilledChecklist *ch = Filled(checklist); const char *key = makeExternalAclKey(ch, acl); assert(key); diff --git a/src/ident/AclIdent.cc b/src/ident/AclIdent.cc index bc8f95fe6f..7b4a0d29ff 100644 --- a/src/ident/AclIdent.cc +++ b/src/ident/AclIdent.cc @@ -134,9 +134,9 @@ IdentLookup::checkForAsync(ACLChecklist *cl)const const ConnStateData *conn = checklist->conn(); // check that ACLIdent::match() tested this lookup precondition assert(conn && Comm::IsConnOpen(conn->clientConnection)); - debugs(28, 3, HERE << "Doing ident lookup" ); - checklist->asyncInProgress(true); - Ident::Start(checklist->conn()->clientConnection, LookupDone, checklist); + debugs(28, 3, HERE << "Doing ident lookup" ); + checklist->asyncInProgress(true); + Ident::Start(checklist->conn()->clientConnection, LookupDone, checklist); } void