From: Automatic source maintenance Date: Tue, 30 Oct 2012 00:13:18 +0000 (-0600) Subject: SourceFormat Enforcement X-Git-Tag: SQUID_3_4_0_1~538 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dacb64b9003f12a4b535bea2d6198f47ae268fbf;p=thirdparty%2Fsquid.git SourceFormat Enforcement --- diff --git a/src/HelperReply.cc b/src/HelperReply.cc index 983dabd232..bc33a84984 100644 --- a/src/HelperReply.cc +++ b/src/HelperReply.cc @@ -45,7 +45,7 @@ HelperReply::HelperReply(const char *buf, size_t len) : p+=3; } - for(;xisspace(*p);++p); // skip whitespace + for (; xisspace(*p); ++p); // skip whitespace } const mb_size_t blobSize = (buf+len-p); @@ -60,8 +60,7 @@ std::ostream & operator <<(std::ostream &os, const HelperReply &r) { os << "{result="; - switch(r.result) - { + switch (r.result) { case HelperReply::Okay: os << "OK"; break; diff --git a/src/auth/digest/UserRequest.cc b/src/auth/digest/UserRequest.cc index 2caea95f1b..cd23866967 100644 --- a/src/auth/digest/UserRequest.cc +++ b/src/auth/digest/UserRequest.cc @@ -280,10 +280,8 @@ Auth::Digest::UserRequest::HandleReply(void *data, const HelperReply &reply) assert(replyData->auth_user_request != NULL); Auth::UserRequest::Pointer auth_user_request = replyData->auth_user_request; - switch(reply.result) - { - case HelperReply::Error: - { + switch (reply.result) { + case HelperReply::Error: { /* allow this because the digest_request pointer is purely local */ Auth::Digest::UserRequest *digest_request = dynamic_cast(auth_user_request.getRaw()); assert(digest_request); @@ -294,11 +292,10 @@ Auth::Digest::UserRequest::HandleReply(void *data, const HelperReply &reply) if (reply.other().hasContent()) digest_request->setDenyMessage(reply.other().content()); } - break; + break; case HelperReply::Unknown: // Squid 3.2 and older the digest helper only returns a HA1 hash (no "OK") - case HelperReply::Okay: - { + case HelperReply::Okay: { /* allow this because the digest_request pointer is purely local */ Auth::Digest::User *digest_user = dynamic_cast(auth_user_request->user().getRaw()); assert(digest_user != NULL); @@ -306,7 +303,7 @@ Auth::Digest::UserRequest::HandleReply(void *data, const HelperReply &reply) CvtBin(reply.other().content(), digest_user->HA1); digest_user->HA1created = 1; } - break; + break; default: ; // XXX: handle other states properly. diff --git a/src/auth/negotiate/UserRequest.cc b/src/auth/negotiate/UserRequest.cc index 19e99fce78..77420cb616 100644 --- a/src/auth/negotiate/UserRequest.cc +++ b/src/auth/negotiate/UserRequest.cc @@ -274,8 +274,7 @@ Auth::Negotiate::UserRequest::HandleReply(void *data, const HelperReply &reply) } const char *blob = modifiableBlob; - switch(reply.result) - { + switch (reply.result) { case HelperReply::TT: /* we have been given a blob to send to the client */ safe_free(lm_request->server_blob); @@ -292,8 +291,7 @@ Auth::Negotiate::UserRequest::HandleReply(void *data, const HelperReply &reply) break; case HelperReply::AF: - case HelperReply::Okay: - { + case HelperReply::Okay: { if (arg == NULL) { // XXX: handle a success with no username better /* protocol error */ @@ -336,7 +334,7 @@ Auth::Negotiate::UserRequest::HandleReply(void *data, const HelperReply &reply) auth_user_request->user()->credentials(Auth::Ok); debugs(29, 4, HERE << "Successfully validated user via Negotiate. Username '" << arg << "'"); } - break; + break; case HelperReply::NA: case HelperReply::Error: diff --git a/src/auth/ntlm/UserRequest.cc b/src/auth/ntlm/UserRequest.cc index 80f33f2e09..50d7e32fe7 100644 --- a/src/auth/ntlm/UserRequest.cc +++ b/src/auth/ntlm/UserRequest.cc @@ -258,8 +258,7 @@ Auth::Ntlm::UserRequest::HandleReply(void *data, const HelperReply &reply) /* seperate out the useful data */ const char *blob = reply.other().content(); - switch(reply.result) - { + switch (reply.result) { case HelperReply::TT: /* we have been given a blob to send to the client */ safe_free(lm_request->server_blob); @@ -276,8 +275,7 @@ Auth::Ntlm::UserRequest::HandleReply(void *data, const HelperReply &reply) break; case HelperReply::AF: - case HelperReply::Okay: - { + case HelperReply::Okay: { /* we're finished, release the helper */ auth_user_request->user()->username(blob); auth_user_request->denyMessage("Login successful"); @@ -313,7 +311,7 @@ Auth::Ntlm::UserRequest::HandleReply(void *data, const HelperReply &reply) auth_user_request->user()->credentials(Auth::Ok); debugs(29, 4, HERE << "Successfully validated user via NTLM. Username '" << blob << "'"); } - break; + break; case HelperReply::NA: case HelperReply::Error: diff --git a/src/base/Lock.h b/src/base/Lock.h index 5153fda9f5..11bcfe6119 100644 --- a/src/base/Lock.h +++ b/src/base/Lock.h @@ -14,7 +14,8 @@ * Build with -DLOCKCOUNT_DEBUG flag to enable lock debugging. * It is disabled by default due to the cost of debug output. */ -class Lock { +class Lock +{ public: Lock():count_(0) {} diff --git a/src/redirect.cc b/src/redirect.cc index 63aadb3b5b..0e3aee5c0f 100644 --- a/src/redirect.cc +++ b/src/redirect.cc @@ -93,7 +93,7 @@ redirectHandleReply(void *data, const HelperReply &reply) if (const char *t = strchr(res, ' ')) { static int warn = 0; debugs(61, (!(warn++%50)? DBG_CRITICAL:2), "UPGRADE WARNING: URL rewriter reponded with garbage '" << t << - "'. Future Squid will treat this as part of the URL."); + "'. Future Squid will treat this as part of the URL."); const mb_size_t garbageLength = reply.other().contentSize() - (t-res); reply.modifiableOther().truncate(garbageLength); }