]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
SourceFormat Enforcement
authorAutomatic source maintenance <squidadm@squid-cache.org>
Tue, 30 Oct 2012 00:13:18 +0000 (18:13 -0600)
committerAutomatic source maintenance <squidadm@squid-cache.org>
Tue, 30 Oct 2012 00:13:18 +0000 (18:13 -0600)
src/HelperReply.cc
src/auth/digest/UserRequest.cc
src/auth/negotiate/UserRequest.cc
src/auth/ntlm/UserRequest.cc
src/base/Lock.h
src/redirect.cc

index 983dabd23224ae157e3948d1116dbe8144edc927..bc33a84984ccdb814c07fbfed5f0f8ec1b68d985 100644 (file)
@@ -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;
index 2caea95f1b97dd42a238c99381bea6ac4a0bfdc0..cd2386696701902c58cd4658a7b799b9168ea973 100644 (file)
@@ -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::Digest::UserRequest *>(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::Digest::User *>(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.
index 19e99fce7806273e9379ce0f30fa3981630c8247..77420cb616e3efb9e533f631e3ee73cbec94b65e 100644 (file)
@@ -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:
index 80f33f2e090135bedf23dee53aab32193faac4cc..50d7e32fe71f4415357df13e952c5404b18a290e 100644 (file)
@@ -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:
index 5153fda9f5b15dafecae892eca74d7440b5aa270..11bcfe6119162c003de50b4e084b4eb3c0533740 100644 (file)
@@ -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) {}
 
index 63aadb3b5b519f76ab9beafa88fd336a24b77963..0e3aee5c0ff933a06609785870d1a211a192a21c 100644 (file)
@@ -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);
             }