Fix compilation on windows with clang, indentation cleanups

R=henrike@webrtc.org, thakis@chromium.org
TBR=hellner@chromium.org

Committed: https://code.google.com/p/webrtc/source/detail?r=6779

Review URL: https://webrtc-codereview.appspot.com/18849004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6786 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/talk/base/httpcommon.cc b/talk/base/httpcommon.cc
index ec7ffd2..05af9c2 100644
--- a/talk/base/httpcommon.cc
+++ b/talk/base/httpcommon.cc
@@ -60,9 +60,9 @@
 bool find_string(size_t& index, const std::string& needle,
                  const char* const haystack[], size_t max_index) {
   for (index=0; index<max_index; ++index) {
-	if (_stricmp(needle.c_str(), haystack[index]) == 0) {
-	  return true;
-	}
+    if (_stricmp(needle.c_str(), haystack[index]) == 0) {
+      return true;
+    }
   }
   return false;
 }
@@ -451,9 +451,9 @@
       if (combine == HC_YES) {
         it->second.append(",");
         it->second.append(value);
-	  }
+      }
       return;
-	}
+    }
   }
   headers_.insert(HeaderMap::value_type(name, value));
 }
@@ -1007,7 +1007,9 @@
       }
 
       CredHandle cred;
-      ret = AcquireCredentialsHandleA(0, want_negotiate ? NEGOSSP_NAME_A : NTLMSP_NAME_A, SECPKG_CRED_OUTBOUND, 0, pauth_id, 0, 0, &cred, &lifetime);
+      ret = AcquireCredentialsHandleA(
+          0, const_cast<char*>(want_negotiate ? NEGOSSP_NAME_A : NTLMSP_NAME_A),
+          SECPKG_CRED_OUTBOUND, 0, pauth_id, 0, 0, &cred, &lifetime);
       //LOG(INFO) << "$$$ AcquireCredentialsHandle @ " << TimeSince(now);
       if (ret != SEC_E_OK) {
         LOG(LS_ERROR) << "AcquireCredentialsHandle error: "
diff --git a/talk/base/schanneladapter.cc b/talk/base/schanneladapter.cc
index a376328..3d24b64 100644
--- a/talk/base/schanneladapter.cc
+++ b/talk/base/schanneladapter.cc
@@ -149,8 +149,9 @@
   //sc_cred.dwMinimumCipherStrength = 128; // Note: use system default
   sc_cred.dwFlags = SCH_CRED_NO_DEFAULT_CREDS | SCH_CRED_AUTO_CRED_VALIDATION;
 
-  ret = AcquireCredentialsHandle(NULL, UNISP_NAME, SECPKG_CRED_OUTBOUND, NULL,
-                                 &sc_cred, NULL, NULL, &impl_->cred, NULL);
+  ret = AcquireCredentialsHandle(NULL, const_cast<LPTSTR>(UNISP_NAME),
+                                 SECPKG_CRED_OUTBOUND, NULL, &sc_cred, NULL,
+                                 NULL, &impl_->cred, NULL);
   if (ret != SEC_E_OK) {
     LOG(LS_ERROR) << "AcquireCredentialsHandle error: "
                   << ErrorName(ret, SECURITY_ERRORS);
diff --git a/webrtc/base/httpcommon.cc b/webrtc/base/httpcommon.cc
index 095cdaf..569b7b3 100644
--- a/webrtc/base/httpcommon.cc
+++ b/webrtc/base/httpcommon.cc
@@ -43,9 +43,9 @@
 bool find_string(size_t& index, const std::string& needle,
                  const char* const haystack[], size_t max_index) {
   for (index=0; index<max_index; ++index) {
-	if (_stricmp(needle.c_str(), haystack[index]) == 0) {
-	  return true;
-	}
+    if (_stricmp(needle.c_str(), haystack[index]) == 0) {
+      return true;
+    }
   }
   return false;
 }
@@ -57,11 +57,11 @@
 
   static inline const char* Name(E val) { return Names[val]; }
   static inline bool Parse(E& val, const std::string& name) {
-	size_t index;
-	if (!find_string(index, name, Names, Size))
-	  return false;
-	val = static_cast<E>(index);
-	return true;
+    size_t index;
+    if (!find_string(index, name, Names, Size))
+      return false;
+    val = static_cast<E>(index);
+    return true;
   }
 
   E val;
@@ -434,9 +434,9 @@
       if (combine == HC_YES) {
         it->second.append(",");
         it->second.append(value);
-	  }
+      }
       return;
-	}
+    }
   }
   headers_.insert(HeaderMap::value_type(name, value));
 }
@@ -731,7 +731,7 @@
     FreeCredentialsHandle(&cred);
   }
 };
-#endif // WEBRTC_WIN 
+#endif // WEBRTC_WIN
 
 HttpAuthResult HttpAuthenticate(
   const char * challenge, size_t len,
@@ -990,7 +990,9 @@
       }
 
       CredHandle cred;
-      ret = AcquireCredentialsHandleA(0, want_negotiate ? NEGOSSP_NAME_A : NTLMSP_NAME_A, SECPKG_CRED_OUTBOUND, 0, pauth_id, 0, 0, &cred, &lifetime);
+      ret = AcquireCredentialsHandleA(
+          0, const_cast<char*>(want_negotiate ? NEGOSSP_NAME_A : NTLMSP_NAME_A),
+          SECPKG_CRED_OUTBOUND, 0, pauth_id, 0, 0, &cred, &lifetime);
       //LOG(INFO) << "$$$ AcquireCredentialsHandle @ " << TimeSince(now);
       if (ret != SEC_E_OK) {
         LOG(LS_ERROR) << "AcquireCredentialsHandle error: "
@@ -1035,7 +1037,7 @@
     return HAR_RESPONSE;
   }
 #endif
-#endif // WEBRTC_WIN 
+#endif // WEBRTC_WIN
 
   return HAR_IGNORE;
 }
diff --git a/webrtc/base/schanneladapter.cc b/webrtc/base/schanneladapter.cc
index 50c0638..9af15a7 100644
--- a/webrtc/base/schanneladapter.cc
+++ b/webrtc/base/schanneladapter.cc
@@ -132,8 +132,9 @@
   //sc_cred.dwMinimumCipherStrength = 128; // Note: use system default
   sc_cred.dwFlags = SCH_CRED_NO_DEFAULT_CREDS | SCH_CRED_AUTO_CRED_VALIDATION;
 
-  ret = AcquireCredentialsHandle(NULL, UNISP_NAME, SECPKG_CRED_OUTBOUND, NULL,
-                                 &sc_cred, NULL, NULL, &impl_->cred, NULL);
+  ret = AcquireCredentialsHandle(NULL, const_cast<LPTSTR>(UNISP_NAME),
+                                 SECPKG_CRED_OUTBOUND, NULL, &sc_cred, NULL,
+                                 NULL, &impl_->cred, NULL);
   if (ret != SEC_E_OK) {
     LOG(LS_ERROR) << "AcquireCredentialsHandle error: "
                   << ErrorName(ret, SECURITY_ERRORS);